Files
localmodelroutex/backend/.env.example
LovroG05 abecc4b888
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: export request statistics to InfluxDB 3
Add an optional exporter that writes one point per proxied request to
the InfluxDB 3 write endpoint. Points are batched in memory and flushed
by size or interval. The exporter is off until GATEWAY_INFLUX_URL is set.
2026-10-11 17:20:14 +02:00

46 lines
1.7 KiB
Plaintext

# Copy to .env and fill in. Loaded into the environment by the Makefile / Docker;
# real GATEWAY_* environment variables take precedence over this file.
#
# NOTE: keep comments on their own lines (not trailing a KEY=VALUE) so the
# Makefile's `include .env` parses values cleanly.
# --- Server ---
GATEWAY_SERVER_PORT=8080
# development | production (controls log format/level)
GATEWAY_SERVER_ENV=development
# Canonical external URL — required when OIDC is enabled.
# Must match the redirect URI registered in your OIDC provider.
# Dev example: http://localhost:8080 Prod: https://lmr.example.com
GATEWAY_SERVER_PUBLIC_URL=http://localhost:8080
# --- Database ---
GATEWAY_DB_URL=postgres://gateway:gateway@localhost:5432/gateway
GATEWAY_DB_MAX_CONNS=20
GATEWAY_DB_MIN_CONNS=2
# Connection max lifetime, in minutes
GATEWAY_DB_MAX_CONN_LIFETIME=30
# --- OIDC (Authentik or any OIDC provider) ---
# Leave GATEWAY_OIDC_ISSUER empty to disable OIDC and use only the static token.
GATEWAY_OIDC_ISSUER=https://auth.example.com/application/o/llmgateway/
GATEWAY_OIDC_CLIENT_ID=your-client-id
GATEWAY_OIDC_CLIENT_SECRET=your-client-secret
GATEWAY_OIDC_ADMIN_GROUP=llm-admins
# --- Security ---
# 64 hex chars (32 bytes) for AES-256-GCM. Generate with: openssl rand -hex 32
GATEWAY_SECURITY_ENCRYPTION_KEY=
# --- Catalog ---
# How often to sync model lists from providers. Default: 30m
GATEWAY_CATALOG_SYNC_INTERVAL=30m
# --- InfluxDB 3 statistics exporter (optional) ---
# Leave GATEWAY_INFLUX_URL empty to disable the exporter.
GATEWAY_INFLUX_URL=
GATEWAY_INFLUX_TOKEN=
GATEWAY_INFLUX_DATABASE=lmr
GATEWAY_INFLUX_MEASUREMENT=lmr_request
GATEWAY_INFLUX_FLUSH_INTERVAL=10s
GATEWAY_INFLUX_BATCH_SIZE=500