pagepiper/.env.cloud.example
pyr0ball 76aaabd857 feat: rename CF_ORCH_URL to GPU_SERVER_URL for self-hoster clarity
CF_ORCH_URL makes sense internally but isn't self-explanatory for a
local-first user setting up their own GPU rig. Follows the GPU_SERVER_URL
convention Kiwi already established (app/core/config.py there).

- app/config.py: resolves GPU_SERVER_URL -> CF_ORCH_URL (back-compat
  alias) -> https://orch.circuitforge.tech default when CF_LICENSE_KEY
  is present (Paid+ tiers). Written back to os.environ["CF_ORCH_URL"]
  so existing callers (get_llm_config, app/api/chat.py) needed zero
  changes.
- .env.example / .env.cloud.example: document GPU_SERVER_URL as the
  primary name, CF_ORCH_URL noted as a still-honoured legacy alias.
- compose.cloud.yml: the hardcoded coordinator URL now sets
  GPU_SERVER_URL instead of CF_ORCH_URL directly (relies on the same
  config.py normalization).
- docs/reference/environment-variables.md updated.
- 6 new tests covering the resolution priority chain and the
  write-back behavior legacy callers depend on.

Closes: #10
2026-07-10 17:23:27 -07:00

41 lines
1.8 KiB
Text

# pagepiper cloud environment — copy to .env and fill in secrets
# Used by: docker compose -f compose.cloud.yml -p pagepiper-cloud ...
# Data directories (host paths, bind-mounted into the api container)
PAGEPIPER_DATA_DIR=/devl/pagepiper-cloud-data
PAGEPIPER_BOOKS_DIR=/devl/pagepiper-cloud-data/books
# BYOK gate — set to enable hybrid search and RAG chat (BSL feature)
# Leave blank to run BM25-only mode (MIT, no Ollama required)
PAGEPIPER_OLLAMA_URL=
# Embedding and chat model selection (only used when PAGEPIPER_OLLAMA_URL is set)
# mxbai-embed-large (1024-dim) is recommended; nomic-embed-text uses 768-dim
PAGEPIPER_EMBED_MODEL=mxbai-embed-large
PAGEPIPER_EMBED_DIMS=1024
PAGEPIPER_CHAT_MODEL=mistral:7b
# Heimdall license server (optional — for per-user tier validation)
HEIMDALL_URL=https://license.circuitforge.tech
HEIMDALL_ADMIN_TOKEN=
# cf-orch streaming proxy — coordinator product key
# Must match COORDINATOR_PRODUCT_KEYS["pagepiper"] in cf-orch.env on the coordinator
COORDINATOR_PAGEPIPER_KEY=
# GPU server / cf-orch coordinator URL — routes chat/embed calls through managed
# GPU allocation. CF_LICENSE_KEY is the auth token sent to the coordinator (same
# value as COORDINATOR_PAGEPIPER_KEY). Leave blank to skip allocation and hit
# PAGEPIPER_OLLAMA_URL directly. CF_ORCH_URL is still honoured as a legacy alias
# if GPU_SERVER_URL is unset — Paid+ tiers auto-default to orch.circuitforge.tech
# when CF_LICENSE_KEY is present.
GPU_SERVER_URL=
CF_LICENSE_KEY=
CF_APP_NAME=pagepiper
# Forgejo API token — enables in-app feedback button (files issues to Circuit-Forge/pagepiper)
FORGEJO_API_TOKEN=
# Enable thumbs up/down on chat answers (stores retrieval quality signals locally)
# Off by default — opt in when you want to collect correction data
# PAGEPIPER_CHAT_FEEDBACK=true