env fixes again
This commit is contained in:
@@ -15,8 +15,10 @@ services:
|
|||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:13
|
image: postgres:13
|
||||||
env_file:
|
environment:
|
||||||
- stack.env
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=1253
|
||||||
|
- POSTGRES_DB=docupulse
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ echo "Database is ready!"
|
|||||||
|
|
||||||
# Wait for PostgreSQL to be ready to accept connections
|
# Wait for PostgreSQL to be ready to accept connections
|
||||||
echo "Waiting for PostgreSQL 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"
|
echo "PostgreSQL is unavailable - sleeping"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user