Skip to content

Add HEALTHCHECK to APE Dockerfile#368

Merged
Lightheartdevs merged 1 commit intoLight-Heart-Labs:mainfrom
reo0603:feat/ape-healthcheck
Mar 18, 2026
Merged

Add HEALTHCHECK to APE Dockerfile#368
Lightheartdevs merged 1 commit intoLight-Heart-Labs:mainfrom
reo0603:feat/ape-healthcheck

Conversation

@reo0603
Copy link
Contributor

@reo0603 reo0603 commented Mar 18, 2026

Summary

Adds Docker HEALTHCHECK directive to APE service for consistency with other services.

Changes

  • Added HEALTHCHECK to APE Dockerfile matching the pattern used in dashboard-api, token-spy, privacy-shield, and comfyui
  • Interval: 30s, timeout: 5s, start-period: 5s, retries: 3
  • Probes /health endpoint using Python urllib

Consistency

All other Python services in the stack have healthchecks:

  • dashboard-api: curl-based healthcheck
  • token-spy: Python urllib healthcheck
  • privacy-shield: Python urllib healthcheck
  • comfyui: wget-based healthcheck

APE was the only Python service missing this directive.

Copy link
Collaborator

@Lightheartdevs Lightheartdevs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Add HEALTHCHECK to APE Dockerfile

Looks correct overall. The healthcheck targets port 7890 and /health, both matching the APE manifest (manifest.yaml port: 7890, health: /health) and EXPOSE 7890. The Python urllib approach is appropriate since the slim image has no curl/wget.

Minor notes

  1. || exit 1 is redundant (line 15 in the diff): Since HEALTHCHECK CMD uses shell form, Docker already uses the command's exit code. If urllib.request.urlopen fails, Python exits non-zero on its own. The || exit 1 is harmless but unnecessary — fine to keep for readability, just noting it.

  2. No env var expansion needed here: Unlike token-spy (which uses UVICORN_PORT), APE hardcodes port 7890 in both main.py and the Dockerfile, so the hardcoded URL is correct. Shell form vs exec form is not a concern for this specific healthcheck.

Overlap with PR #304 and #372

This PR directly conflicts with PR #304, which adds the same APE healthcheck (identical approach, but with --timeout=10s instead of 5s here) plus a token-spy healthcheck. PR #372 also adds the token-spy healthcheck separately.

All three PRs touch the same file (dream-server/extensions/services/ape/Dockerfile) with nearly identical changes. Merging any two will create a git conflict on the others. The maintainers should decide which to land first — #304 covers both services in one PR, while #368 and #372 split them. Either path works, but the timeout difference (5s here vs 10s in #304) should be reconciled.

Verdict: The change itself is clean and correct. No blocking issues — just coordinate merge order with #304/#372.

@Lightheartdevs Lightheartdevs merged commit 75bedea into Light-Heart-Labs:main Mar 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants