From ade85f668aeaf8410ea65e9829cfe00edba2c301 Mon Sep 17 00:00:00 2001 From: "Guillaume \"B.B.\" Van Hemmen" Date: Thu, 10 Oct 2024 17:43:20 +0200 Subject: [PATCH] #0000 - Update healthcheck command in docker-compose.yml Changed the healthcheck command to use a shell script wrapping `pg_isready` to ensure correct execution of the command with environment variables. This adjustment improves reliability and consistency in the database readiness check. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index bbeb332..ae4e80d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,7 +54,7 @@ services: condition: any delay: 5s healthcheck: - test: [ "CMD-SHELL", "pg_isready", "-U", "${POSTGRES_USERNAME}", "-d", "sonar" ] + test: [ "CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USERNAME} -d sonar'" ] interval: 1s timeout: 5s retries: 10