confluence_web/deploy/confluence-web.env.example
Artur Mukhamadiev 5aad7a0b45 backend: admission queue with reservations
In-memory AdmissionController (idle/reserved/running, FIFO tickets keyed by
the session cookie, reservation and heartbeat expiry, promotion after
cleanup, EMA wait estimate) behind POST /api/v1/queue/join,
GET /api/v1/queue/status and DELETE /api/v1/queue/ticket. POST /api/v1/query
claims the session's reservation first and joins implicitly when idle.
Settings: CONFLUENCE_WEB_QUEUE_{RESERVATION_SECONDS,HEARTBEAT_SECONDS,MAX_LENGTH}.
2026-09-15 13:38:59 +03:00

64 lines
3.5 KiB
Plaintext

# Confluence Research Web UI: backend deployment configuration.
# Copy to deploy/confluence-web.env (git-ignored) and adjust. Values are read by
# scripts/run-backend.sh and exported only into the backend process. Nothing in
# this file is ever passed to the agent container.
# --- Confluence (read-only, user PAT is supplied in the browser at query time) ---
# Approved base origins (comma separated, include context path if any).
# Include the Confluence context path (collab.lge.com serves REST under /main).
CONFLUENCE_WEB_APPROVED_ORIGINS=https://collab.lge.com/main
# Optional outbound proxy for Confluence only (socks5://, socks5h://, http://, https://).
CONFLUENCE_WEB_CONFLUENCE_PROXY=socks5://127.0.0.1:1560
# Optional corporate CA bundle (PEM). Leave unset to use the system trust store.
#CONFLUENCE_WEB_CORPORATE_CA_PATH=/etc/ssl/certs/corporate-ca.pem
# --- Model provider (OpenAI-compatible Chat Completions; backend-held key) ---
CONFLUENCE_WEB_MODEL_PROVIDER=openai
# llama.cpp server tunnel; the endpoint is the full chat completions URL.
CONFLUENCE_WEB_MODEL_ENDPOINT=http://127.0.0.1:4901/v1/chat/completions
# llama-server accepts any bearer token; a real provider needs its real key here.
CONFLUENCE_WEB_MODEL_API_KEY=llama-cpp
CONFLUENCE_WEB_MODEL_NAME=Qwen3.6-35B-A3B
# Provider token limits (separate from the application byte limits in CONTRACTS.md).
CONFLUENCE_WEB_MODEL_CONTEXT_WINDOW_TOKENS=131072
CONFLUENCE_WEB_MODEL_MAX_OUTPUT_TOKENS=8192
# Per-call HTTP timeout; keep below the query deadline (CONFLUENCE_WEB_QUERY_TIMEOUT_SECONDS).
CONFLUENCE_WEB_MODEL_TIMEOUT_SECONDS=540
# --- Agent runtime container (rootless Docker) ---
# Use the exact built tag or, better, the image ID printed by `make build-image`.
CONFLUENCE_WEB_RUNTIME_IMAGE=confluence-pi-agent:rev1
# Unique per deployment; startup/periodic reconciliation removes containers with this label value.
CONFLUENCE_WEB_CONTAINER_LABEL_VALUE=confluence-web-local
#CONFLUENCE_WEB_DOCKER_HOST=unix:///run/user/1000/docker.sock
# --- HTTP / storage ---
# Loopback only by default. To serve colleagues on an internal network, bind the
# host's LAN address AND enable TLS below (PATs must not cross the network in clear).
CONFLUENCE_WEB_BIND_HOST=127.0.0.1
CONFLUENCE_WEB_BIND_PORT=8000
# Optional TLS termination by Uvicorn. Generate with: scripts/make-tls.sh <lan-ip>
# (name-constrained private CA; distribute deploy/tls/ca.crt to colleagues).
#CONFLUENCE_WEB_TLS_CERT=./deploy/tls/server.crt
#CONFLUENCE_WEB_TLS_KEY=./deploy/tls/server.key
# Absolute path to the frontend tree (index.html, css/, js/, vendor/, assets/).
CONFLUENCE_WEB_FRONTEND_DIST_DIR=./frontend
# Private artifact storage (created 0700; purged on startup).
CONFLUENCE_WEB_ARTIFACT_DIR=/tmp/confluence_web_artifacts
CONFLUENCE_WEB_QUERY_TIMEOUT_SECONDS=600
# Protocol maximum for one query (60-3600 s); the query timeout must not exceed it.
# Passed into the agent container at start so its supervisor enforces the same bound.
CONFLUENCE_WEB_MAX_DEADLINE_SECONDS=900
CONFLUENCE_WEB_CLEANUP_TIMEOUT_SECONDS=10
# --- Admission queue (docs/QUEUE_SPECIFICATION.md); defaults shown, allowed ranges in comments ---
# Reservation window after promotion, seconds (30-60).
#CONFLUENCE_WEB_QUEUE_RESERVATION_SECONDS=45
# Heartbeat timeout for queued (not yet reserved) tickets, seconds (5-60).
#CONFLUENCE_WEB_QUEUE_HEARTBEAT_SECONDS=15
# Maximum queued tickets, excluding the reserved and running sessions (1-100).
#CONFLUENCE_WEB_QUEUE_MAX_LENGTH=20
# Never set in production. Substitutes the container, model and Confluence with fakes.
CONFLUENCE_WEB_DEV_MODE=false