mirror of
https://github.com/reconurge/flowsint.git
synced 2026-07-16 00:52:35 -05:00
The celery container builds from flowsint-api/Dockerfile which carries a HEALTHCHECK directive that does `curl -f http://localhost:5001/health`. The API container has an HTTP server on 5001 — celery doesn't, it's a worker. So the inherited healthcheck always fails and `docker ps` shows celery as (unhealthy) even when the worker is actively processing jobs. This is cosmetic noise today but bites in two real ways: (1) restart policies that key off health won't re-up celery on a real failure because Docker can't tell good unhealthy from bad unhealthy, (2) any service that adds `depends_on: celery: condition: service_healthy` will refuse to start. Fix: add a service-level healthcheck on celery in both compose files (prod and dev) that uses celery's own `inspect ping` primitive against the worker's broker. Compose-level healthcheck overrides the Dockerfile-level one, so no Dockerfile change needed. Smoke-tested locally: container goes from (unhealthy) to (healthy) within ~30s of restart with no other changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.6 KiB
4.6 KiB