Use ps instead of pgrep for celery healthchecks

Change healthchecks to use 'ps aux | grep' instead of 'pgrep' since
procps may not be available in existing images. This works with the
base Python image without requiring a rebuild.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Keith Smith
2026-01-09 09:10:02 -07:00
co-authored by Claude Sonnet 4.5
parent 991d4f1eaa
commit ff534301f8
+2 -2
View File
@@ -127,7 +127,7 @@ services:
condition: service_healthy condition: service_healthy
command: celery-worker command: celery-worker
healthcheck: healthcheck:
test: ["CMD-SHELL", "pgrep -f 'celery.*worker' || exit 1"] test: ["CMD-SHELL", "ps aux | grep -v grep | grep 'celery.*worker' || exit 1"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
@@ -162,7 +162,7 @@ services:
condition: service_healthy condition: service_healthy
command: celery-beat command: celery-beat
healthcheck: healthcheck:
test: ["CMD-SHELL", "pgrep -f 'celery.*beat' || exit 1"] test: ["CMD-SHELL", "ps aux | grep -v grep | grep 'celery.*beat' || exit 1"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3