ci(docker): update postgres healthcheck and retry settings

- Modify healthcheck command to use DB_NAME and DB_USER environment variables
- Reduce retries from 10 to 5 to fail faster if database is unavailable
This commit is contained in:
kithmina1999
2025-06-20 08:48:51 +05:30
parent eca7af2d6f
commit 0d0596b767

View File

@@ -83,10 +83,10 @@ services:
POSTGRES_DB: ${DB_NAME:-worklenz_db}
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
healthcheck:
test: ["CMD-SHELL", "pg_isready -h localhost -p 5432 -U postgres"]
test: [ "CMD-SHELL", "pg_isready -d ${DB_NAME:-worklenz_db} -U ${DB_USER:-postgres}" ]
interval: 10s
timeout: 5s
retries: 10
retries: 5
restart: unless-stopped
networks:
- worklenz