fix(healthcheck): raise app start_period 1m->15m (slow fresh-DB migration)

Ghost's fresh-DB first boot runs a full schema migration (dozens of CREATE
TABLEs, each a separate MySQL round-trip; ~6-9min on a small/slow node). The
1m start_period + 10x30s retries (~6min grace) is too tight there: swarm marks
the still-migrating task unhealthy and kills it mid-migration, leaving a stale
migrations_lock row so every later task deadlocks (MigrationsAreLockedError).

start_period only widens the startup grace window: a healthy check still marks
the task healthy immediately, so fast hosts are unaffected. It cannot be exposed
as an env var (abra validates the literal compose 'duration' format BEFORE env
substitution, rejecting ${VAR} / "${VAR:-1m}" with FATA 'Does not match format
duration'), so a literal bump is the only way to widen it.
This commit is contained in:
2026-05-30 17:18:13 +01:00
parent 6d6227f7ba
commit ae43ffe340

View File

@ -57,7 +57,7 @@ services:
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
start_period: 15m
db:
image: mysql:8.0