#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.
This commit is contained in:
Guillaume "B.B." Van Hemmen 2024-10-10 17:43:20 +02:00
parent f526692e59
commit ade85f668a

View file

@ -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