From 74c9fdd66b0547fc75022aee3bb868e3eee7baab Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 18 Mar 2026 15:45:24 +0000 Subject: [PATCH] fix: add database name to postgres healthcheck (#203) When POSTGRES_USER differs from POSTGRES_DB, pg_isready defaults to connecting to a database named after the user, causing healthcheck to fail with "database does not exist". --- docker-compose.postgres.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.postgres.yml b/docker-compose.postgres.yml index ed6cd82d..4b51565a 100644 --- a/docker-compose.postgres.yml +++ b/docker-compose.postgres.yml @@ -19,7 +19,7 @@ services: volumes: - postgres-data:/var/lib/postgresql healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-goclaw}"] + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-goclaw} -d ${POSTGRES_DB:-goclaw}"] interval: 5s timeout: 5s retries: 10