Add HEALTHCHECK to token-spy Dockerfile#372
Add HEALTHCHECK to token-spy Dockerfile#372reo0603 wants to merge 3 commits intoLight-Heart-Labs:mainfrom
Conversation
Lightheartdevs
left a comment
There was a problem hiding this comment.
Conflicts with PR #304
This PR overlaps directly with #304, which also adds a HEALTHCHECK to the token-spy Dockerfile (and additionally covers APE). Merging both will produce a conflict on the same lines. Coordinate — either close this in favor of #304, or merge this first and rebase #304.
Hardcoded port ignores UVICORN_PORT
The healthcheck hardcodes port 8080, but the CMD at the bottom of the same Dockerfile uses ${UVICORN_PORT:-8080}. If UVICORN_PORT is set to a non-8080 value, uvicorn listens on that port while the healthcheck still probes 8080 — container gets marked unhealthy. PR #304 handles this correctly with shell variable expansion.
Minor: timeout inconsistency
This PR uses --timeout=5s while other Python-based healthchecks (privacy-shield, #304) use --timeout=10s. Spawning a Python interpreter is slower than curl, so 10s is safer.
|
What's needed to get this merged:
|
|
Updated to address the review feedback:
The healthcheck now works correctly regardless of which port uvicorn is configured to use. |
Summary
Motivation
Token-spy was the only remaining Python service without a HEALTHCHECK directive. All other services (dashboard-api, APE, privacy-shield, comfyui) have health monitoring configured.
Changes
/healthendpoint (port 8080)Testing