Summary
docker/Dockerfile.worker:86 declares a healthcheck that can never pass:
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD celery -A app.celery inspect ping --timeout 5 -d celery@$HOSTNAME
This project uses RQ (rq worker ml), not Celery. There is no app.celery module, and celery is not installed in the worker image, so every health check fails.
Impact
- Worker container is always reported unhealthy.
- Any tooling that gates on the worker healthcheck (orchestrator restarts, monitoring) misbehaves.
Suggested fix
Replace with an RQ-aware check. Options:
redis-cli -h redis ping (needs redis-tools in the image), or- a tiny Python check that queries Redis for the RQ queue, e.g.
python -c "import redis; r=redis.from_url('redis://redis:6379/0'); r.ping()", or - check a live worker is registered (
r.lrange('rq:workers', 0, -1) non-empty).
Verification
docker compose build worker then docker compose up worker and run docker inspect on the container; the healthcheck must become healthy.
Summary
docker/Dockerfile.worker:86declares a healthcheck that can never pass:This project uses RQ (
rq worker ml), not Celery. There is noapp.celerymodule, andceleryis not installed in the worker image, so every health check fails.Impact
Suggested fix
Replace with an RQ-aware check. Options:
redis-cli -h redis ping(needs redis-tools in the image), orpython -c "import redis; r=redis.from_url('redis://redis:6379/0'); r.ping()", orr.lrange('rq:workers', 0, -1)non-empty).Verification
docker compose build workerthendocker compose up workerand rundocker inspecton the container; the healthcheck must becomehealthy.