trails/infrastructure/.env.example
Ullrich Schäfer fc4485f6ef
Apply configurable-demo-persona: per-instance demo identity + voice
Adds DEMO_BOT_PERSONA env var (inline JSON or file:<path>) so
self-hosted instances can replace Bruno-in-Berlin with their own
demo account identity and content pools. No-op for trails.cool — the
built-in Bruno persona remains the default.

- DemoPersona type + Zod schema validation
- loadPersona() cached at boot; falls back to default on any failure
- ensureDemoUser throws DemoPersonaUsernameClashError when the
  persona username is already a real user; server declines to
  schedule demo jobs for that process
- isDemoUser flag moved from hardcoded "bruno" check to loader-supplied
  boolean computed from the running persona
- docs/demo-persona.md explains the schema + operator flow

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:30:32 +02:00

21 lines
880 B
Text

# trails.cool infrastructure environment variables
# Copy to .env and fill in values
DOMAIN=trails.cool
POSTGRES_PASSWORD=change-me
JWT_SECRET=change-me
S3_ACCESS_KEY=
S3_SECRET_KEY=
# Demo-activity-bot. Only enable in prod. When true, the journal worker
# bootstraps a demo user and generates public demo routes + activities
# every 90 min. Retention is in days (default 14).
# DEMO_BOT_ENABLED=true
# DEMO_BOT_RETENTION_DAYS=14
# DEMO_BOT_REGION={"bbox":[13.25,52.45,13.55,52.60]}
#
# Override the default Bruno persona (identity + generated copy) via
# either an inline JSON blob or a file path. See docs/demo-persona.md
# for the schema.
# DEMO_BOT_PERSONA=file:/etc/trails-cool/persona.json
# DEMO_BOT_PERSONA={"username":"hamish","displayName":"Hamish","bio":"...","locales":["en"],"content":{"names":{"en":["...","...","..."]},"descriptions":{"en":["...","...","..."]}}}