From 750c2c2f60b46e872b48f3f945b62be14a02b94d Mon Sep 17 00:00:00 2001 From: Arnaud Nelissen Date: Sat, 13 Jun 2026 18:02:15 +0200 Subject: [PATCH] fix(compose): use CMD form for pg_isready healthcheck, add start_period CMD-SHELL drops pg_isready from PATH on some Alpine setups. Switch to explicit CMD array form with -h 127.0.0.1. start_period gives postgres time to initialize before failures count against retries. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8b5cdb2..c7c2326 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,10 +9,11 @@ services: volumes: - postgres_data:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U grow"] + test: ["CMD", "pg_isready", "-U", "grow", "-d", "grow", "-h", "127.0.0.1"] interval: 5s timeout: 5s - retries: 10 + retries: 20 + start_period: 15s app: build: .