From 0d0596b767e8b3c6b10a997e81f2e402b36e20a1 Mon Sep 17 00:00:00 2001 From: kithmina1999 Date: Fri, 20 Jun 2025 08:48:51 +0530 Subject: [PATCH] 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 --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 51b30b3a..363f2006 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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