Merge pull request #6161 from gsiv/dev/pg_isready

Avoid triggering errors with pg_isready
This commit is contained in:
Sean 2021-07-16 12:37:23 +02:00 committed by GitHub
commit 5bb9553cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,11 @@ source /run/secrets/django || true
} }
export SECRET_KEY="$DJANGO_SECRET_KEY" export SECRET_KEY="$DJANGO_SECRET_KEY"
until pg_isready -h "${DATABASE_HOST:-pgbouncer}" -p "${DATABASE_PORT:-5432}"; do export PGHOST="${DATABASE_HOST:-pgbouncer}"
export PGPORT="${DATABASE_PORT:-5432}"
export PGDATABASE="${DATABASE_NAME:-openslides}"
export PGUSER="${DATABASE_USER:-openslides}"
until pg_isready; do
echo "Waiting for Postgres cluster to become available..." echo "Waiting for Postgres cluster to become available..."
sleep 3 sleep 3
done done