From 3e8498f8de3c431dfb4cee901986f95388910681 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Thu, 4 Dec 2025 08:59:49 -0700 Subject: [PATCH] fix: specify database name in healthcheck for postgres service in docker-compose.yml if the database is not specified docker tries to connect to a database called "user" by default which may not exist leading to false negatives in health checks for the postgres service. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9d3f1ebd2..0c232629f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: volumes: - postgres_data:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"] + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 2s timeout: 5s retries: 20