services: omniroute: image: ghcr.io/thefrenchghosty/omniroute:latest container_name: omniroute restart: unless-stopped stop_grace_period: 40s environment: # ── Runtime ──────────────────────────────────────────────────────────── NODE_ENV: production CONTAINER_HOST: docker HOSTNAME: 0.0.0.0 DATA_DIR: /app/data # ── Ports ────────────────────────────────────────────────────────────── PORT: 20128 DASHBOARD_PORT: 20128 API_PORT: 20129 API_HOST: 0.0.0.0 # ── Live WebSocket ───────────────────────────────────────────────────── LIVE_WS_PORT: 20132 LIVE_WS_HOST: 0.0.0.0 LIVE_WS_ALLOWED_ORIGINS: https://omniroute.domain.ext NEXT_PUBLIC_LIVE_WS_PUBLIC_URL: wss://omniroute.domain.ext/live-ws # ── Public URL / reverse proxy ───────────────────────────────────────── NEXT_PUBLIC_BASE_URL: https://omniroute.domain.ext BASE_URL: http://omniroute:20128 AUTH_COOKIE_SECURE: "true" # ── Redis (rate limiter) ─────────────────────────────────────────────── REDIS_URL: redis://omniroute-redis:6379 # ── Required secrets — FILL THESE IN before first run ───────────────── # openssl rand -base64 48 JWT_SECRET: "" # openssl rand -hex 32 API_KEY_SECRET: "" # openssl rand -hex 32 (leave empty to disable SQLite at-rest encryption) STORAGE_ENCRYPTION_KEY: "" STORAGE_ENCRYPTION_KEY_VERSION: v1 # Initial dashboard password — change after first login INITIAL_PASSWORD: CHANGEME # openssl rand -hex 16 (any random string) MACHINE_ID_SALT: CHANGEME # ── Security / auth ──────────────────────────────────────────────────── REQUIRE_API_KEY: "false" ALLOW_API_KEY_REVEAL: "false" # ── Storage ──────────────────────────────────────────────────────────── DISABLE_SQLITE_AUTO_BACKUP: "false" # ── Prompt/request modification — all OFF ───────────────────────────── # Default-ON request-side prompt-injection scanner. Kills the whole guard # regardless of INJECTION_GUARD_MODE. INPUT_SANITIZER_ENABLED: "false" # Default-ON filter that drops commentary-phase items from Codex Responses # passthrough streams. false = raw upstream stream items. RESPONSES_PASSTHROUGH_DROP_COMMENTARY: "false" # Already off by default and left untouched: PII redaction, response PII # sanitization, credential redaction, tool policy, MCP description # compression, model-alias rewriting, CLI compat header/body reordering, # Codex SSE frame dropping, compression prefix-freeze, payload rules # (shipped file is empty: default/override/filter all []). # ── Local/private providers (Ollama, LM Studio, vLLM, llama.cpp, LAN) ── # Upstream blocks private-network provider URLs by default (SSRF guard). OMNIROUTE_ALLOW_PRIVATE_PROVIDER_URLS: "true" OMNIROUTE_ALLOW_LOCAL_PROVIDER_URLS: "true" # ── Memory ───────────────────────────────────────────────────────────── # V8 heap cap (--max-old-space-size). Node reads HOST RAM, not the cgroup # limit, so set this explicitly in containers to avoid OOM-kills (#2939). OMNIROUTE_MEMORY_MB: "4096" # ── Dev / build flags (harmless in prod, kept for parity) ────────────── OMNIROUTE_USE_TURBOPACK: "1" # Fix for slow providers DEFAULT_RATE_LIMIT_PER_DAY: 0 RATE_LIMIT_MAX_WAIT_MS: 300000 # requestQueue.maxWaitMs — queue wait budget RATE_LIMIT_MAX_QUEUE_DEPTH: 50 # optional: fast-reject when queue exceeds N (0 = disabled) # More fixes REQUEST_TIMEOUT_MS: 600000 FETCH_TIMEOUT_MS: 600000 OMNIROUTE_DEFAULT_FETCH_TIMEOUT_MS: 600000 FETCH_CONNECT_TIMEOUT_MS: 120000 FETCH_KEEPALIVE_TIMEOUT_MS: 30000 OMNIROUTE_DIRECT_HEADERS_TIMEOUT_MS: 600000 OMNIROUTE_RELAY_FETCH_TIMEOUT_MS: 60000 # Allow multiples "heavy" chats in parallels OMNIROUTE_CHAT_MAX_HEAVY_IN_FLIGHT: 10 OMNIROUTE_CHAT_ADMISSION_QUEUE_MS: 5000 ports: - "127.0.0.1:20128:20128" - "127.0.0.1:20132:20132" volumes: - ./data:/app/data depends_on: omniroute-redis: condition: service_healthy healthcheck: test: ["CMD", "node", "healthcheck.mjs"] interval: 30s timeout: 5s retries: 3 start_period: 15s omniroute-redis: image: docker.io/library/redis:8-alpine container_name: omniroute-redis restart: unless-stopped command: redis-server --save 60 1 --loglevel warning volumes: - ./redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 3