From 0025d5a0b0796b4a85192c7ad04c7001cd58f84b 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 d33b1902c1..7ddb17e209 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,8 +19,8 @@ services: - tasking-manager.env restart: unless-stopped healthcheck: - test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} - 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 @@ -43,7 +43,6 @@ services: test: curl --fail http://localhost:5000 || exit 1 interval: 10s retries: 5 - start_period: 10s timeout: 3s deploy: replicas: ${API_REPLICAS:-1}