fix(setup): inject docker-network service URLs into dashboard-api for diagnostics#1134
fix(setup): inject docker-network service URLs into dashboard-api for diagnostics#1134SSignall wants to merge 1 commit intoLight-Heart-Labs:mainfrom
Conversation
… diagnostics
`scripts/dream-test-functional.sh` is invoked by `POST /api/setup/test`
running *inside* the dashboard-api container. The script's defaults
(`http://localhost:<port>`) work when run on the host (where each
service is published on `127.0.0.1:<port>`), but inside the container
`localhost` is the container's own loopback — every test connect-
refuses, the setup wizard reports "Some functional tests failed", and
the user gets stuck on the "Complete Setup" screen even when LLM / TTS
/ Whisper are healthy.
Set `LLM_URL`, `TTS_URL`, `EMBEDDING_URL`, `WHISPER_URL` on the
dashboard-api service to the docker network hostnames. The script's
existing `${VAR:-default}` pattern then picks these up, while host-
side invocations of the script keep working as before via the
unchanged `localhost:<port>` defaults.
Verified on a live install: LLM and TTS go from "Connection refused" /
HTTP 000 to functional PASS. Embeddings and Whisper still fail in this
test stack, but for unrelated reasons (TEI amd64-only, missing whisper
model) — both out of scope.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lightheartdevs
left a comment
There was a problem hiding this comment.
Thanks for tightening the setup diagnostics container URLs. I found one blocking routing issue in the new LLM_URL env.
docker-compose.base.yml now sets LLM_URL=${LLM_URL:-http://llama-server:8080} for dashboard-api, while the existing dashboard API env already sets OLLAMA_URL=${LLM_API_URL:-http://llama-server:8080}. That distinction matters: the installers intentionally write LLM_API_URL=http://litellm:4000 for AMD/Lemonade local mode and for non-local modes, because requests need to route through LiteLLM instead of directly to llama-server.
I rendered the compose config with GPU_BACKEND=amd and LLM_API_URL=http://litellm:4000; the result is:
OLLAMA_URL: http://litellm:4000
LLM_URL: http://llama-server:8080
So /api/setup/test would still run dream-test-functional.sh against http://llama-server:8080/v1/... in those modes, even though the rest of the dashboard/API stack is configured to use http://litellm:4000. For Lemonade specifically, the direct service path differs (/api/v1 behind the adapter path), so this can make setup diagnostics fail despite the configured LLM route being correct.
Please derive LLM_URL from LLM_API_URL when no explicit LLM_URL override is provided, for example by preserving a manual LLM_URL override but otherwise mirroring the same LLM_API_URL default used by OLLAMA_URL. A compose-render regression test for the AMD/LiteLLM case would be ideal here.
Local checks run:
git diff --check origin/main...HEAD- traced
/api/setup/testtoscripts/dream-test-functional.sh - rendered
docker compose ... config dashboard-apiwithLLM_API_URL=http://litellm:4000, which exposed the mismatch above
Summary
scripts/dream-test-functional.shis run byPOST /api/setup/testfrom the setup wizard's "Run Diagnostics" step. The script is executed inside the dashboard-api container, but itsLLM_URL/TTS_URL/EMBEDDING_URL/WHISPER_URLdefaults all point athttp://localhost:<port>. Those defaults are correct for someone running the script on the host (where each service is published on127.0.0.1:<port>), but inside the containerlocalhostis the container's own loopback, so every test connect-refuses regardless of service health.Symptom: setup wizard reports
0/3 passed, Some tests failed.even when LLM / TTS / Whisper are all healthy → "Complete Setup" stays disabled (disabled={!config.tested}inSetupWizard.jsx) and the user is stuck on the diagnostics screen.Fix
Set the URLs explicitly on
dashboard-apiindocker-compose.base.yml, using docker network hostnames:The script's existing
${VAR:-default}pattern picks these up. Host-side invocations of the script (e.g. for debugging) keep working as before via the unchangedlocalhost:<port>defaults.Before / after on a live install (DGX Spark, GB10)
Before:
After:
LLM and TTS now correctly reflect actual health. The remaining two failures are real, separate bugs out of scope here:
text-embeddings-inferencedoes not publish an arm64 manifest, sodream-embeddingscan't start on aarch64 hosts (already tracked as a follow-up to arm64 / NVIDIA Grace Blackwell support — partial #1129 #1130).dream-whisperreturns{"detail":"Model 'Systran/faster-whisper-large-v3' is not installed locally."}on this install — a model-provisioning issue separate from the diagnostic plumbing.Test plan
make lintdocker compose ... config dashboard-apishows the four URLs on the merged config.dashboard-apion live install;POST /api/setup/testnow produces the after-output above (LLM + TTS PASS).🤖 Generated with Claude Code