From b1ad854de6de5282be68578fbc4c254f113070c4 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 17 May 2024 14:03:59 +0200 Subject: [PATCH] Revert changes to database container Signed-off-by: Simon L --- Containers/postgresql/healthcheck.sh | 7 +------ Containers/postgresql/start.sh | 10 +--------- php/containers.json | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Containers/postgresql/healthcheck.sh b/Containers/postgresql/healthcheck.sh index 2b29a955..c2ee4ec7 100644 --- a/Containers/postgresql/healthcheck.sh +++ b/Containers/postgresql/healthcheck.sh @@ -2,9 +2,4 @@ test -f "/mnt/data/backup-is-running" && exit 0 -# Set a default value for POSTGRES_PORT -if [ -z "$POSTGRES_PORT" ]; then - POSTGRES_PORT=5432 -fi - -psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:$POSTGRES_PORT/$POSTGRES_DB" -c "select now()" || exit 1 +psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" || exit 1 diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh index 0e7a35aa..4ae7369f 100644 --- a/Containers/postgresql/start.sh +++ b/Containers/postgresql/start.sh @@ -6,14 +6,6 @@ export DUMP_DIR="/mnt/data" DUMP_FILE="$DUMP_DIR/database-dump.sql" export PGPASSWORD="$POSTGRES_PASSWORD" -# Set a default value for POSTGRES_PORT -if [ -z "$POSTGRES_PORT" ]; then - POSTGRES_PORT=5432 -fi - -# Set PGPORT (the variable used by the postgres entrypoint) to the configured value -export PGPORT=$POSTGRES_PORT - # Don't start database as long as backup is running while [ -f "$DUMP_DIR/backup-is-running" ]; do echo "Waiting for backup container to finish..." @@ -139,7 +131,7 @@ EOSQL pg_ctl stop -m fast # Change database port back to default - export PGPORT=$POSTGRES_PORT + export PGPORT=5432 # Don't exit if command fails anymore set +ex diff --git a/php/containers.json b/php/containers.json index f34bbd04..fd1e137e 100644 --- a/php/containers.json +++ b/php/containers.json @@ -99,7 +99,6 @@ "POSTGRES_PASSWORD=%DATABASE_PASSWORD%", "POSTGRES_DB=nextcloud_database", "POSTGRES_USER=nextcloud", - "POSTGRES_PORT=5432", "TZ=%TIMEZONE%", "PGTZ=%TIMEZONE%" ],