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:
+3
-2
@@ -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: .
|
||||
|
||||
Reference in New Issue
Block a user