SysDeck/klanker-gate/.env.example.dev

72 lines
3.3 KiB
Plaintext
Executable File

# =============================================================================
# Frosty Deno - minimal local development configuration
# =============================================================================
# cp .env.example.dev .env
# docker compose up -d postgres # REQUIRED, see below
# deno task setup # one-time
# deno task dev # gateway on http://localhost:8080
#
# Everything omitted here has a safe default, so this is the smallest config
# that boots a useful gateway. For the full surface copy `.env.example` and read
# docs/reference/environment-variables.md.
# --- REQUIRED: PostgreSQL -----------------------------------------------------
# The gateway keeps ALL durable state here (control-plane config, governance
# counters, the request-log trail, the L2 response cache, the pgvector index)
# and refuses to boot without it - `FROSTY_PG_URL is required` (decision-log
# 61). There is no embedded fallback; Deno KV used to hold this and is retired.
#
# docker compose up -d postgres
#
# The Compose service sets user/password/db to `frosty`. Use `localhost` when
# the gateway runs on the host (`deno task dev`); inside Compose the gateway
# service already defaults itself to the `postgres` hostname.
FROSTY_PG_URL=postgres://frosty:frosty@localhost:5432/frosty
# --- REQUIRED: one provider + the default route -------------------------------
# The gateway boots with no key, but has nothing to route to. Set ONE of the
# blocks below and point FROSTY_DEFAULT_PROVIDER at its id.
# a) A hosted vendor.
OPENAI_API_KEY=
# ANTHROPIC_API_KEY=
# b) Any OpenAI-compatible server (vLLM, llama.cpp, LM Studio, TGI, ...).
# Registers as provider id `openai-compatible`.
# OPENAI_COMPAT_BASE_URL=http://localhost:8000/v1
# OPENAI_COMPAT_API_KEY=
# OPENAI_COMPAT_DEFAULT_MODEL=
# Provider used for model names without a `provider/` prefix. Must match an id
# above (`openai`, `anthropic`, `openai-compatible`, ...).
FROSTY_DEFAULT_PROVIDER=openai
# --- Gateway basics (optional; defaults shown) --------------------------------
PORT=8080
# Unset = admin API open on localhost, which is what local dev wants. Set it to
# require `Authorization: Bearer <token>` on every /api/* route.
FROSTY_ADMIN_TOKEN=
# --- OPTIONAL: response cache -------------------------------------------------
# Unset = off. "exact" needs nothing beyond the Postgres above. "semantic" also
# needs an embedding model, and FROSTY_VECTOR_STORE=pgvector to keep the vectors
# in that same database rather than in-process (so they survive a restart).
#
# FROSTY_CACHE=semantic
# FROSTY_VECTOR_STORE=pgvector
#
# One thing that fails SILENTLY here, because cache lookups are fail-open: an
# embed model id the provider does not serve 404s on every lookup. The id below
# is sent verbatim and is case-sensitive - check GET /v1/models. Boot logs
# `semantic cache lookup degraded to miss: ...` when it is wrong.
# FROSTY_CACHE_EMBED_MODEL=text-embedding-3-small
# --- OPTIONAL: metrics and traces ---------------------------------------------
# `GET /metrics` is always on and needs nothing. Traces need a collector:
#
# docker compose --profile observability up -d
#
# then set the endpoint below (it is deliberately not defaulted, because without
# that profile the host does not resolve). Grafana lands on http://localhost:3000.
# OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318