deploy/README.md becomes the real runbook: the VPS stack, Traefik, the headscale LLM link, the interim edge gate, backups and restore. The millenia Piper notes move to an appendix -- that instance still runs them, and it is still canonical. Two items are called out as outstanding rather than done, because both need access to millenia: vLLM is not bound to its headscale interface, so no AI pass works from the VPS yet, and parodia's ssh key is not authorized there, so backups are VPS-local only -- which is not a backup in the sense that matters. Each has its one-command fix written down. Also folds in DreamDict gaining Spanish: es was explicitly gated on that dataset existing, so it moves from "Later / not now" to a normal follow-on pair after pt-PT, and the Phase 20 provider seam should cover it from the start.
47 lines
2.1 KiB
Bash
47 lines
2.1 KiB
Bash
# Petal — copy to .env and fill in. All values have local-dev defaults; override as needed.
|
|
|
|
# Server
|
|
PORT=8080
|
|
BASE_URL=http://localhost:8080
|
|
|
|
# Database (SQLite, pure-Go modernc — no cgo)
|
|
DATABASE_PATH=./data/petal.db
|
|
|
|
# On-disk store for images pasted/dropped/inserted in the editor
|
|
IMAGE_DIR=./data/images
|
|
|
|
# LLM
|
|
LLM_BACKEND=vllm # vllm | ollama
|
|
LLM_ENDPOINT=http://localhost:8000 # vLLM :8000, Ollama :11434
|
|
LLM_MODEL= # checkpoint model (small/fast). Never hardcoded.
|
|
LLM_CHAT_MODEL= # Ask Petal model (Mandarin-native). Falls back to LLM_MODEL if empty.
|
|
LLM_TIMEOUT=30s
|
|
|
|
# Read-aloud (TTS). Off unless TTS_ENDPOINT is set — when empty, the /api/tts route
|
|
# is not mounted and the frontend falls back to the browser's Web Speech API.
|
|
# Backed by a local Piper HTTP server (python3 -m piper.http_server).
|
|
# Each Piper HTTP server loads ONE voice, so English and Chinese need separate
|
|
# instances (different ports). zh is only routed when both TTS_ENDPOINT_ZH and
|
|
# TTS_VOICE_ZH are set; otherwise Chinese falls back to Web Speech.
|
|
TTS_ENDPOINT= # e.g. http://127.0.0.1:5005 — empty disables server TTS
|
|
TTS_ENDPOINT_ZH= # e.g. http://127.0.0.1:5006 — Chinese Piper instance
|
|
TTS_VOICE_EN=en_US-amy-medium # Piper voice id for English
|
|
TTS_VOICE_ZH=zh_CN-huayan-medium # Piper voice id for Chinese
|
|
TTS_PATH=/ # path Piper serves synthesis on: "/" up to piper-tts 1.5, "/synthesize" from 1.6.0
|
|
TTS_CACHE_DIR=./data/tts # on-disk store for synthesized clips (content-addressed)
|
|
TTS_TIMEOUT=15s
|
|
TTS_AUDIO_FORMAT=mp3 # mp3 | opus | wav — mp3/opus transcode Piper's WAV via ffmpeg
|
|
|
|
# --- Deferred (not wired in the local-dev build) ---
|
|
|
|
# Auth (Authentik OIDC) — deferred; single hardcoded local user for now
|
|
# SESSION_SECRET=change-me-to-random-64-char-string
|
|
# AUTHENTIK_URL=https://auth.parodia.dev
|
|
# AUTHENTIK_CLIENT_ID=petal
|
|
# AUTHENTIK_CLIENT_SECRET=
|
|
|
|
# Copyleaks (Tier-2 plagiarism) — deferred; needs a public webhook
|
|
# COPYLEAKS_ENABLED=false
|
|
# COPYLEAKS_API_KEY=
|
|
# COPYLEAKS_EMAIL=
|