env fixes again
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user