env fixes again

This commit is contained in:
2025-05-26 16:13:44 +02:00
parent 6e62e21b0c
commit f546430daa
2 changed files with 5 additions and 3 deletions

View File

@@ -15,8 +15,10 @@ services:
db:
image: postgres:13
env_file:
- stack.env
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=1253
- POSTGRES_DB=docupulse
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:

View File

@@ -9,7 +9,7 @@ echo "Database is ready!"
# Wait for PostgreSQL to be ready to accept connections
echo "Waiting for PostgreSQL to accept connections..."
until PGPASSWORD=1253 psql -h db -U postgres -d docupulse -c '\q'; do
until PGPASSWORD=$POSTGRES_PASSWORD psql -h db -U $POSTGRES_USER -d $POSTGRES_DB -c '\q'; do
echo "PostgreSQL is unavailable - sleeping"
sleep 1
done