mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-11 17:26:57 +02:00
- Sépare le port hôte (HOST_PORT, défaut 8717) du port interne du conteneur (8080)
- docker-compose.yml : mapping ${HOST_PORT:-8717}:8080
- docker-compose.unraid.yml : 8717:8080
- .env.example : HOST_PORT=8717
- README : références de port mises à jour
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVay7z3y7q2gEe54ByAE6N
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
services:
|
|
loki:
|
|
build: .
|
|
container_name: loki
|
|
ports:
|
|
# Port d'accès sur l'hôte (gauche) -> port interne du conteneur (droite)
|
|
- "${HOST_PORT:-8717}:8080"
|
|
environment:
|
|
- OLLAMA_HOST=${OLLAMA_HOST:-http://host.docker.internal:11434}
|
|
- DEFAULT_MODEL=${DEFAULT_MODEL:-llama3.1:8b}
|
|
- WORKSPACE_DIR=/workspace
|
|
- DATA_DIR=/data
|
|
- PORT=8080
|
|
# Optionnel : instance SearxNG pour web_search (sinon DuckDuckGo)
|
|
- SEARX_URL=${SEARX_URL:-}
|
|
volumes:
|
|
- ./workspace:/workspace
|
|
- ./data:/data
|
|
extra_hosts:
|
|
# Permet d'atteindre un Ollama installé sur la machine hôte
|
|
- "host.docker.internal:host-gateway"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/api/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
restart: unless-stopped
|
|
|
|
# ── Ollama optionnel ──────────────────────────────────────────────────
|
|
# Par défaut, Loki se connecte à un Ollama déjà présent sur l'hôte.
|
|
# Pour embarquer Ollama dans la stack, lance : docker compose --profile ollama up
|
|
# et règle OLLAMA_HOST=http://ollama:11434
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
container_name: loki-ollama
|
|
profiles: ["ollama"]
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama-models:/root/.ollama
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
ollama-models:
|