docker-entrypoint: fix DATABASE_URL building

This commit is contained in:
Alex Gleason 2022-08-12 18:29:19 -05:00
parent c5649dbd27
commit f4b002d844
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -2,10 +2,10 @@
set -e
DATABASE_URL=${DATABASE_URL:"postgres://${DB_HOST:-db}:5432/${DB_NAME:-pleroma}"}
DATABASE_URL=${DATABASE_URL:-"postgres://${DB_USER:-postgres}:${DB_PASS:-postgres}@${DB_HOST:-db}:5432/${DB_NAME:-postgres}"}
echo "-- Waiting for database..."
while ! pg_isready -U ${DB_USER:-pleroma} -d $DATABASE_URL -t 1; do
while ! pg_isready -d $DATABASE_URL -t 1; do
sleep 1s
done