[PR #142] [MERGED] fix: replace celery container's inherited curl-based healthcheck #1129

Closed
opened 2026-05-03 01:59:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/reconurge/flowsint/pull/142
Author: @harmsolo13
Created: 4/29/2026
Status: Merged
Merged: 4/29/2026
Merged by: @dextmorgn

Base: mainHead: fix/celery-healthcheck


📝 Commits (1)

  • d4dbe8d fix: replace celery container's inherited curl-based healthcheck

📊 Changes

2 files changed (+16 additions, -0 deletions)

View changed files

📝 docker-compose.dev.yml (+8 -0)
📝 docker-compose.prod.yml (+8 -0)

📄 Description

Summary

The celery container inherits the API's Dockerfile-level HEALTHCHECK CMD curl -f http://localhost:5001/health. Celery has no HTTP server — it's a worker — so the check always fails and docker ps shows celery as (unhealthy) even when the worker is happily processing jobs.

Cosmetic in normal operation, but bites in two real ways:

  1. Restart policies keyed off health can't distinguish good-unhealthy from bad-unhealthy.
  2. Any service that adds depends_on: celery: condition: service_healthy refuses to start.

Fix

Add a service-level healthcheck: block on celery in both docker-compose.prod.yml and docker-compose.dev.yml using celery's own inspect ping against the worker's broker. Compose-level overrides the Dockerfile-level, so no Dockerfile change needed.

Test

Smoke-tested locally on Docker Compose v5.1.2: flowsint-celery-prod flips from (unhealthy)(healthy) within ~30s of restart, no other changes.

Test plan

  • docker compose up -d celery — container reports healthy within 30s
  • docker inspect --format '{{.State.Health.Status}}' flowsint-celery-prod returns healthy

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/reconurge/flowsint/pull/142 **Author:** [@harmsolo13](https://github.com/harmsolo13) **Created:** 4/29/2026 **Status:** ✅ Merged **Merged:** 4/29/2026 **Merged by:** [@dextmorgn](https://github.com/dextmorgn) **Base:** `main` ← **Head:** `fix/celery-healthcheck` --- ### 📝 Commits (1) - [`d4dbe8d`](https://github.com/reconurge/flowsint/commit/d4dbe8d0fe291e1f4449b598991ee6116cca0585) fix: replace celery container's inherited curl-based healthcheck ### 📊 Changes **2 files changed** (+16 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docker-compose.dev.yml` (+8 -0) 📝 `docker-compose.prod.yml` (+8 -0) </details> ### 📄 Description ## Summary The celery container inherits the API's Dockerfile-level `HEALTHCHECK CMD curl -f http://localhost:5001/health`. Celery has no HTTP server — it's a worker — so the check always fails and `docker ps` shows celery as `(unhealthy)` even when the worker is happily processing jobs. Cosmetic in normal operation, but bites in two real ways: 1. Restart policies keyed off health can't distinguish good-unhealthy from bad-unhealthy. 2. Any service that adds `depends_on: celery: condition: service_healthy` refuses to start. ## Fix Add a service-level `healthcheck:` block on celery in both `docker-compose.prod.yml` and `docker-compose.dev.yml` using celery's own `inspect ping` against the worker's broker. Compose-level overrides the Dockerfile-level, so no Dockerfile change needed. ## Test Smoke-tested locally on Docker Compose v5.1.2: `flowsint-celery-prod` flips from `(unhealthy)` → `(healthy)` within ~30s of restart, no other changes. ## Test plan - [ ] `docker compose up -d celery` — container reports healthy within 30s - [ ] `docker inspect --format '{{.State.Health.Status}}' flowsint-celery-prod` returns `healthy` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-03 01:59:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/flowsint#1129