fix(compose): drop service_healthy, use service_started + sleep

pg_isready healthchecks broken server-wide (root_db, hoppscotch-db also
unhealthy). Remove healthcheck block, depend on service_started only.
migrate sleeps 5s to give postgres time to accept connections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 18:38:05 +02:00
parent 750c2c2f60
commit 493f6ab7fc
+3 -12
View File
@@ -8,19 +8,11 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "grow", "-d", "grow", "-h", "127.0.0.1"]
interval: 5s
timeout: 5s
retries: 20
start_period: 15s
app:
build: .
restart: unless-stopped
depends_on:
db:
condition: service_healthy
- db
ports:
- "${PORT:-3000}:3000"
environment:
@@ -43,10 +35,9 @@ services:
build:
context: .
target: builder
command: node_modules/.bin/prisma db push
command: sh -c "sleep 5 && node_modules/.bin/prisma db push"
depends_on:
db:
condition: service_healthy
- db
environment:
DATABASE_URL: "postgresql://grow:${POSTGRES_PASSWORD}@db:5432/grow"
restart: "no"