From c4ac33bd7cb7cc502d223af616a0d4df776fe42d Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sat, 21 Feb 2026 18:30:11 -0700 Subject: [PATCH] fix: add proper healthchecks for Celery containers Celery containers inherited the HTTP healthcheck from the Dockerfile but don't run a web server. Added celery inspect ping for the worker and schedule file check for beat. Co-Authored-By: Claude Opus 4.6 --- docker-compose.prod.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 18bbaa2..e8b2e76 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -121,6 +121,12 @@ services: condition: service_healthy redis: condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "celery -A config inspect ping --timeout 10 | grep -q 'pong'"] + interval: 30s + timeout: 15s + start_period: 40s + retries: 3 cap_drop: - ALL security_opt: @@ -146,6 +152,12 @@ services: - SECRET_KEY=${SECRET_KEY} depends_on: - celery-worker + healthcheck: + test: ["CMD-SHELL", "test -f /tmp/celerybeat-schedule"] + interval: 30s + timeout: 5s + start_period: 40s + retries: 3 cap_drop: - ALL security_opt: