Files
esh-pfi-infrastructure/stacks/skaldsong/.env.example
T
vh 8a4276d6b5 skaldsong: align env-var contract with app reality (pre-first-deploy)
skaldsong-dev surfaced three contract corrections before the first
deploy:

- WORLDTREE_TOKEN (outbound HTTP Bearer) was missing — separate code
  path from SKALDSONG_BIFROST_JWT_KEY (inbound HS256 verify) but
  same secret value.
- WORLDTREE_BASE_URL replaces SKALDSONG_WORLDTREE_API_URL (the
  former is what the app actually reads).
- SKALDSONG_HOST_WIZARD_AGENT_ID was missing entirely — must pin to
  skaldsong:wizard-v2 to inherit the existing Worldtree agent slot;
  blank would burn another slot of the 50-per-key Heimdall quota.
2026-05-18 23:10:37 -07:00

62 lines
2.9 KiB
Bash

# skaldsong stack tunables. Copy to `.env` on ana-docker before deploying.
#
# The deploy playbook seeds `.env` from this template on first run only —
# it won't clobber an existing `.env`.
# Image tag. CI's deploy.yaml pushes this SHA-pinned per commit:
# gitea.phasefinal.com/vh/skaldsong:<sha>
# Workflow passes the SHA via `scripts/elway ... --var ref=<sha>`; the
# playbook substitutes that into this var before `docker compose up -d`.
# For manual runs, set to a known good SHA (e.g. after a green CI run):
SKALDSONG_IMAGE=gitea.phasefinal.com/vh/skaldsong:latest
# Host port exposing the wizard UI + Bifrost endpoint. Container always
# listens on 8000 internally. 8300 is the canonical slot — adjacent to
# the 8xxx web-app block (asset-engine:8200, sillytavern:8100, beszel:8090).
SKALDSONG_PORT=8300
# Bind address for the host port. 0.0.0.0 = LAN-reachable.
SKALDSONG_BIND=0.0.0.0
# Host paths for persistent state. db/ holds skaldsong-ui.db (SQLite,
# wizard state + story rows); runs/ holds per-story generation pipeline
# artifacts (spec, state, output, logs, manuscripts). Created with uid
# 1000 (matches container's app user — no chown dance needed).
SKALDSONG_DB_DIR=/opt/docker/conf/skaldsong/db
SKALDSONG_RUNS_DIR_HOST=/opt/docker/conf/skaldsong/runs
# Worldtree integration ─────────────────────────────────────────────────
# Shared-secret Bearer for Worldtree's HS256 Bifrost JWT path. Same
# value as Worldtree's WORLDTREE_SKALDSONG_USER_KEY env. Get from
# worldtree-dev when standing up a fresh deploy; rotate via worldtree-dev's
# /heimdall:rotate flow if compromise suspected.
SKALDSONG_BIFROST_JWT_KEY=
# URL Worldtree uses to call BACK to skaldsong's Bifrost endpoint at
# tool-dispatch time. Must match Worldtree's BIFROST_CLIENT_ALLOWED_HOSTS
# entry. From ana-docker LAN: http://10.250.50.70:8300 (this port).
# Coordinated update with worldtree-dev required if host:port changes.
SKALDSONG_HOST_BIFROST_ENDPOINT_URL=http://10.250.50.70:8300
# Worldtree API client — outbound. Same Bearer as
# SKALDSONG_BIFROST_JWT_KEY (different code path consumes it).
WORLDTREE_TOKEN=
WORLDTREE_BASE_URL=http://10.250.50.152:8080
# Wizard agent ID on Worldtree. MUST be pinned to the existing slot
# (skaldsong:wizard-v2) — blank would POST /agents/define and burn a
# slot of the 50-agent-per-key quota. Heimdall scopes agent_id to
# user_id, so this matches the agent defined from skaldsong-dev's
# prior nh3-dev hand-launch.
SKALDSONG_HOST_WIZARD_AGENT_ID=skaldsong:wizard-v2
# CORS — comma-separated origins. Include the SPA's public hostname AND
# any dev origins still in rotation.
SKALDSONG_HOST_CORS_ORIGINS=http://10.250.50.70:8300
# TTS — Kokoro on irv-ml1, reached over WireGuard via ana-wg. Same URL
# works fleet-wide; the WG tunnel handles the cross-site routing.
SKALDSONG_TTS_ENGINE=kokoro
SKALDSONG_TTS_BASE_URL=http://10.100.79.3:8193