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 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 18:02:15 +02:00
parent 8ed0113d6d
commit 750c2c2f60
+3 -2
View File
@@ -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: .