localAI: Fix healthcheck pointing to wrong port (8080 instead of 10078) - #8563
localAI: Fix healthcheck pointing to wrong port (8080 instead of 10078)#8563MichelleAntunes wants to merge 1 commit into
Conversation
Signed-off-by: Michelle Antunes <117948294+MichelleAntunes@users.noreply.github.com>
|
Additional context: found a related upstream issue after opening this PR — mudler/LocalAI#10987 (worker-mode containers permanently unhealthy because the healthcheck always probes the default frontend port). The fix there (#10999) made HEALTHCHECK_ENDPOINT empty-by-default and mode-aware via a healthcheck.sh script. This PR addresses the same root cause — a hardcoded default that doesn't reflect the container's actual runtime configuration — but for the case of a custom port (10078) rather than worker mode. The Nextcloud community container is pinned to quay.io/go-skynet/local-ai:v3.12.1-gpu-vulkan, which predates that upstream fix. Until the pinned base image is bumped, this explicit override remains necessary. |
| "LOCALAI_MODEL_PATH=/models", | ||
| "LOCALAI_BACKEND_PATH=/backends" | ||
| "LOCALAI_BACKEND_PATH=/backends", | ||
| "HEALTHCHECK_ENDPOINT=http://localhost:10078/readyz" |
There was a problem hiding this comment.
| "HEALTHCHECK_ENDPOINT=http://localhost:10078/readyz" | |
| "HEALTHCHECK_ENDPOINT=http://127.0.0.1:10078/readyz" |
Fix healthcheck pointing to wrong port (8080 instead of 10078)'
Problem: The nextcloud-aio-local-ai container is permanently reported as unhealthy, even though the LocalAI service itself works correctly.
Root cause: The base image's built-in HEALTHCHECK reads its target from the HEALTHCHECK_ENDPOINT environment variable, which defaults to http://localhost:8080/readyz. This community container configures LocalAI to listen on port 10078 instead (via LOCALAI_ADDRESS=:10078), but never overrides HEALTHCHECK_ENDPOINT to match — so the healthcheck always probes an empty port and fails.
Fix: Add HEALTHCHECK_ENDPOINT=http://localhost:10078/readyz to the environment array in local-ai.json.
Tested: Manually recreated the container on my own AIO instance with this environment variable added; it now reports healthy, and Context Chat / Nextcloud Assistant continued working normally throughout.
Summary
3. to review, feature component)AI (if applicable)