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 <noreply@anthropic.com>
This commit is contained in:
parent
91bb60c130
commit
c4ac33bd7c
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue