feat(compose): allow external Ollama via OLLAMA_BASE_URL override

For the split where the LLM runs on a separate LAN host (e.g. a GPU box at
192.168.10.9) and the app stack runs elsewhere (192.168.10.5), the brain must
reach Ollama over the network. The javis service hardcoded
OLLAMA_BASE_URL=http://ollama:11434, ignoring any .env value, so the app could
only use the in-stack Ollama. Make it ${OLLAMA_BASE_URL:-http://ollama:11434}:
default unchanged (all-in-one), overridable to point at an external Ollama.
Document the external-Ollama setup in .env.example and DEPLOY.md, refresh the
browser-host IP examples (.9→.5), and de-hardcode the .9 example in novnc.ts.
This commit is contained in:
javis-bot
2026-07-22 13:42:58 +09:00
parent ffc16665e5
commit db51bb92e6
4 changed files with 36 additions and 8 deletions

View File

@@ -51,7 +51,13 @@ MELO_FALLBACK_PIPER=0
# Jarvis brain (Ollama-backed). In Docker these populate the rendered
# config (docker/jarvis-config.template.json). See src/jarvis/config.py.
# ---------------------------------------------------------------------------
# In docker-compose this is overridden to http://ollama:11434 automatically.
# In docker-compose this defaults to the in-stack `ollama` service
# (http://ollama:11434). To use an EXTERNAL Ollama on another LAN machine (e.g. a
# GPU host), set it here to that host's IP — the compose now respects this value:
# OLLAMA_BASE_URL=http://192.168.10.9:11434 # Ollama runs on the .9 host
# In that split setup: do NOT start the in-stack ollama/ollama-init (run
# `docker compose up -d javis`), pull the models on the LLM host, and make that
# host's Ollama listen on the LAN (OLLAMA_HOST=0.0.0.0:11434).
OLLAMA_BASE_URL=http://127.0.0.1:11434
# qwen2.5:3b — small non-reasoning instruct model. ~2.4GB, runs 100% on the GPU
# (the 8B offloads ~8% to CPU), warm voice turns ~2-4s vs ~5-7s on 8B. Clean