Merge pull request #5815 from gsiv/fix/entrypoint-db

server: Fix database config in Docker entrypoint
This commit is contained in:
Gernot Schulz 2021-01-22 16:33:42 +01:00 committed by GitHub
commit 7e67e0db12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,12 +24,7 @@ source /run/secrets/django
}
export SECRET_KEY="$DJANGO_SECRET_KEY"
# Configure database
# TODO: env variables??
echo "postgres:5432:instancecfg:openslides:openslides" > "${HOME}/.pgpass"
chmod 600 "${HOME}/.pgpass"
until pg_isready -h db; do
until pg_isready -h "${DATABASE_HOST}" -p "${DATABASE_PORT:-5432}"; do
echo "Waiting for Postgres cluster to become available..."
sleep 3
done