llm-gateway/docker-compose.yaml
Rene Fichtmueller 0191c60b64 chore: commit deployed gateway state (dashboard, streaming, routing, bridges, cost-tracking)
Live production state on Erik that had drifted from Gitea — deployed across several
sessions but never committed. Excludes deploy/ecosystem.config.cjs (holds live tokens).

- dashboard: passive usage-report endpoint, per-device entries, CEST timezone, cost-panel rounding
- completion: SSE + HTTP/2 streaming
- pipeline: routing-rules, request-scorer, external-providers (subscription bridges)
- cost-tracking: tokenvault migration, cost-calculator, request-logger
- infra: docker-compose bridge env, server/health/tls, deps
2026-06-05 20:23:33 +00:00

59 lines
2.1 KiB
YAML

services:
llm-gateway:
build: .
container_name: llm-gateway
ports:
- "3100:3100"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
NODE_ENV: production
PORT: "3100"
DATABASE_URL: "${DATABASE_URL}"
TIP_DATABASE_URL: "${TIP_DATABASE_URL}"
OLLAMA_URL: "http://192.168.178.169:11434"
OLLAMA_BASE_URL: "${OLLAMA_BASE_URL:-https://ollama.fichtmueller.org}"
CLAUDE_BRIDGE_ENABLED: "true"
CLAUDE_BRIDGE_URL: "${CLAUDE_BRIDGE_URL:-http://host.docker.internal:3250}"
CLAUDE_CODE_URL: "${CLAUDE_CODE_URL:-http://host.docker.internal:3250}"
OPENAI_BRIDGE_URL: "${OPENAI_BRIDGE_URL:-http://host.docker.internal:3251}"
CHATGPT_BRIDGE_URL: "${CHATGPT_BRIDGE_URL:-http://host.docker.internal:3251}"
COPILOT_BRIDGE_URL: "${COPILOT_BRIDGE_URL:-http://host.docker.internal:3252}"
GEMINI_BRIDGE_URL: "${GEMINI_BRIDGE_URL:-http://host.docker.internal:3254}"
CODEX_BRIDGE_URL: "${CODEX_BRIDGE_URL:-http://host.docker.internal:3253}"
OPENAI_CODEX_URL: "${OPENAI_CODEX_URL:-http://host.docker.internal:3253}"
AIDER_BRIDGE_URL: "${AIDER_BRIDGE_URL:-http://host.docker.internal:3256}"
SHIELDX_URL: "${SHIELDX_URL:-}"
GITEA_URL: "http://gitea.context-x.org"
LOG_LEVEL: "${LOG_LEVEL:-info}"
DASHBOARD_AUTH_TOKEN: "${DASHBOARD_AUTH_TOKEN:-}"
REFERENCE_INPUT_COST_PER_1K: "${REFERENCE_INPUT_COST_PER_1K:-0.005}"
REFERENCE_OUTPUT_COST_PER_1K: "${REFERENCE_OUTPUT_COST_PER_1K:-0.015}"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "-O-", "http://localhost:3100/health/live"]
interval: 30s
timeout: 10s
retries: 3
networks:
- gateway-net
llm-learning:
build:
context: packages/learning
dockerfile: Dockerfile
container_name: llm-learning
environment:
DATABASE_URL: "${DATABASE_URL}"
GATEWAY_URL: "http://llm-gateway:3100"
restart: unless-stopped
depends_on:
llm-gateway:
condition: service_healthy
networks:
- gateway-net
networks:
gateway-net:
driver: bridge