Files
orchestra/deploy/orchestra.env.example
T
2026-07-30 01:30:59 +04:00

102 lines
4.5 KiB
Bash

# Copy to /etc/orchestra/orchestra.env (chmod 600, owned by the orchestra
# user) and fill in the values you need. Referenced by orchestra.service via
# EnvironmentFile=. Every var below is read directly from os.Getenv in
# cmd/orchestra/main.go and the packages it wires up — grep ORCHESTRA_ in the
# repo if this list ever needs re-deriving.
# --- Core ---
ORCHESTRA_DATA=/var/lib/orchestra/data
ORCHESTRA_PORT=9145
# --- Federation worker (set only on a harness host such as workpc) ---
# ORCHESTRA_URL=http://homesrv:9145
# ORCHESTRA_WORKER_ID=workpc-opencode # must equal ORCHESTRA_WORKER_HERDR_ID
# ORCHESTRA_WORKER_TOKEN=<per-worker-secret>
# ORCHESTRA_FEDERATION_ADMIT_TOKEN=<homesrv-admission-secret>
# ORCHESTRA_WORKER_HERDR_ID=workpc-opencode
# ORCHESTRA_WORKER_HARNESS=opencode
# ORCHESTRA_WORKER_HERDR=/home/orchestra/.config/herdr/herdr.sock
# ORCHESTRA_WORKER_STATE=/var/lib/orchestra-worker/state.json
# ORCHESTRA_GIT_REMOTE=origin
ORCHESTRA_MACHINE_ID=homesrv # required when the registry has multiple machines
# Static project/machine/herdr topology (registry.Load). Required for
# routing across more than one machine; validated at startup.
ORCHESTRA_CONFIG=/etc/orchestra/config.json
# --- Git worktrees (global default; per-project repo/worktree_root in
# ORCHESTRA_CONFIG overrides this per project — see registry.Project) ---
ORCHESTRA_REPO=/var/lib/orchestra/repo.git
ORCHESTRA_WORKTREE_ROOT=/var/lib/orchestra/worktrees
# Protocol version fallback for herdrs that don't set "protocol" in
# ORCHESTRA_CONFIG. Prefer setting it per-herdr in the config; only use this
# if every herdr on the fleet truly matches.
#ORCHESTRA_HERDR_PROTOCOL=1
# Hard rotation occupancy threshold (0 < x < 1). Default 0.75 if unset/invalid.
ORCHESTRA_OCCUPANCY_HARD=0.75
# Advisory handoff threshold and the harness context window used to turn
# per-session token counts into occupancy. Both values are worker-local.
ORCHESTRA_OCCUPANCY_SOFT=0.55
ORCHESTRA_CONTEXT_WINDOW=200000
# OpenCode stores per-session token counters in SQLite. This optional override
# must point at the worker-local database; the worker persists the resolved
# session ID for each lease, never "the latest" session.
#ORCHESTRA_OPENCODE_DB=/home/orchestra/.local/share/opencode/opencode.db
# --- Providers ---
# Local JSONL task ingestion (baseline adapter).
#ORCHESTRA_JSONL=/var/lib/orchestra/tasks.jsonl
# Gitea issue ingestion + terminal-state reflection.
#
# Multiple repos (one per project) — preferred if you have more than one
# Gitea-backed project. Points at a JSON array of
# {project,base_url,owner,repo,token,webhook_secret}; project is the
# registry project id ingested tasks are tagged with. Each source gets its
# own webhook path: /v1/providers/gitea/webhook/{project}.
#ORCHESTRA_GITEA_CONFIG=/etc/orchestra/gitea.json
#
# Single repo (legacy) — all four required together. Ignored if
# ORCHESTRA_GITEA_CONFIG is set. Webhook path is the unprefixed
# /v1/providers/gitea/webhook. Ingested tasks are tagged with project =
# ORCHESTRA_GITEA_REPO.
#ORCHESTRA_GITEA_URL=https://gitea.example.internal
#ORCHESTRA_GITEA_TOKEN=
#ORCHESTRA_GITEA_OWNER=
#ORCHESTRA_GITEA_REPO=
#ORCHESTRA_GITEA_WEBHOOK_SECRET=
# --- Delivery (notify-only surfaces) ---
# Telegram: both required together.
#ORCHESTRA_TELEGRAM_BOT_TOKEN=
#ORCHESTRA_TELEGRAM_CHAT_ID=
# ntfy: topic required, token/url optional (self-hosted ntfy). This token is
# handed *out* to the ntfy server; it is not an inbound credential — see
# ORCHESTRA_NTFY_SURFACE_TOKEN below.
#ORCHESTRA_NTFY_TOPIC=
#ORCHESTRA_NTFY_TOKEN=
#ORCHESTRA_NTFY_URL=https://ntfy.sh
# --- Bus authorization tokens (bearer auth per surface; a surface with no
# token set has no auth requirement — set these once you have real clients) ---
#ORCHESTRA_TUI_TOKEN=
# Required: the service refuses to start without both. The browser UI's
# task, lifecycle and approval controls are session-gated; it no longer
# accepts a shared Web bearer token. Generate the bcrypt hash with:
# go run ./cmd/orchestra-password
ORCHESTRA_WEB_USERNAME=operator
ORCHESTRA_WEB_PASSWORD_HASH=
# Set when the UI is served over plain HTTP, so the session cookie can be
# sent without Secure. Leave unset behind TLS.
#ORCHESTRA_UI_INSECURE_COOKIE=1
#ORCHESTRA_MCP_TOKEN=
#ORCHESTRA_MAVEN_TOKEN=
# Inbound bearer tokens for the notify-only surfaces, separate from the
# credentials used to *send* (ORCHESTRA_TELEGRAM_BOT_TOKEN, ORCHESTRA_NTFY_TOKEN).
# S12: ORCHESTRA_NTFY_TOKEN used to serve both roles, so configuring ntfy
# delivery silently minted a valid inbound credential.
#ORCHESTRA_TELEGRAM_TOKEN=
#ORCHESTRA_NTFY_SURFACE_TOKEN=