fix: give backend healthcheck a 90s start_period
Backend startup needs ~30-60s (spaCy NLP models load, mem0 v2 init, MCP session manager, 4 workers). The Dockerfile's 5s start-period was too short, causing willfarrell/autoheal (running on the host with AUTOHEAL_CONTAINER_LABEL=all) to kill the container before it finished booting. Overriding the healthcheck in compose with a longer start_period keeps failures from counting until the app is actually ready.
This commit is contained in:
parent
14c47238bd
commit
3385b8397b
1 changed files with 10 additions and 0 deletions
|
|
@ -47,6 +47,16 @@ services:
|
|||
depends_on:
|
||||
qdrant:
|
||||
condition: service_healthy
|
||||
# Backend startup loads spaCy (NLP extra), initializes mem0 v2, mounts MCP,
|
||||
# and warms 4 workers — needs ~30-60s. start_period below keeps healthcheck
|
||||
# failures from counting (and from triggering willfarrell/autoheal) during
|
||||
# boot.
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 90s
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
|
|
|
|||
Loading…
Reference in a new issue