From e787ec20d7491f7944668b3a57d548b23a75c7b1 Mon Sep 17 00:00:00 2001 From: mahesh-naxa Date: Fri, 19 Jul 2024 11:45:38 +0545 Subject: [PATCH] fix: db container healthchecks that was earlier broken --- docker-compose.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 883dfbb15e..89c2d175bf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,8 +17,8 @@ services: - tasking-manager.env restart: unless-stopped healthcheck: - test: pg_isready -U ${POSTGRES_USER:-tm} -d ${POSTGRES_DB:-tasking-manager} - start_period: 35s + test: psql -h 0.0.0.0 -U ${POSTGRES_USER:-tm} -d ${POSTGRES_DB:-tasking-manager} -c 'SELECT 1;' + start_period: 5s interval: 10s timeout: 5s retries: 3 @@ -45,7 +45,6 @@ services: test: curl --fail http://localhost:5000 || exit 1 interval: 10s retries: 5 - start_period: 10s timeout: 3s deploy: replicas: ${API_REPLICAS:-1}