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:
@@ -83,10 +83,10 @@ services:
|
|||||||
POSTGRES_DB: ${DB_NAME:-worklenz_db}
|
POSTGRES_DB: ${DB_NAME:-worklenz_db}
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
||||||
healthcheck:
|
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
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- worklenz
|
- worklenz
|
||||||
|
|||||||
Reference in New Issue
Block a user