Add CI workflow, full env docs, fix Up button navigation
Some checks failed
Build and Push / build (push) Failing after 2m15s

- .gitea/workflows/build.yaml: Gitea Actions — push latest on main
- docker-compose.example.yml: image-based pull, all NAT20_ vars shown
- settings.py: add NAT20_PLAYER_RECAP_STYLE / CUSTOM_PROMPT overrides
- README.md: full env var reference table with accepted values + rationale
- files.py: fix parent_path to avoid up-button bug; add path traversal guard
- Files.tsx: remove copy/paste/autoPlay, scope to campaign
This commit is contained in:
KansaiGaijin
2026-07-10 22:17:47 +12:00
parent bc7ac32de3
commit ef44155b5d
4 changed files with 136 additions and 38 deletions

View File

@@ -1,26 +1,69 @@
# Example Docker Compose — uses a named volume so data persists across rebuilds
# without needing a specific host path. Copy to docker-compose.yml and customise.
# Example Docker Compose — copy to docker-compose.yml and customise.
# Build locally: docker compose build
# Pull pre-built: docker compose pull
# Run: docker compose up -d
services:
whisperx-base:
build:
context: ./backend
target: whisperx-base
image: nat20-whisperx-base:latest
restart: "no"
backend:
build:
context: ./backend
target: runtime
image: nat20-backend:latest
# ── Pre-built image (pull from registry) ──────────────────
image: gitea.kansaigaijin.com/Jamie/Nat20-Notes/backend:latest
# ── Or build locally (uncomment below) ────────────────────
# build:
# context: ./backend
# target: runtime
restart: unless-stopped
depends_on:
- whisperx-base
environment:
# Skip setup wizard on container restart (or "false" to force re-run)
NAT20_ONBOARDING_COMPLETED: "true"
# ── Setup wizard ──────────────────────────────────────
# "false" (or omit) to show the wizard on first run.
# Set to "true" after onboarding completes.
NAT20_ONBOARDING_COMPLETED: "false"
# ── Transcription ─────────────────────────────────────
# Model size: tiny | base | small | medium | large-v3
NAT20_WHISPER_MODEL: medium
# Compute precision: int8 (fastest/least VRAM)
# | float16 (more accurate)
# | float32 (full precision, slowest)
NAT20_WHISPER_COMPUTE_TYPE: int8
# Required for speaker diarization (accept HF gated-model terms first)
# NAT20_HF_TOKEN: "hf_..."
# ── LLM backend (Ollama — local) ──────────────────────
NAT20_OLLAMA_HOST: http://localhost:11434
NAT20_OLLAMA_MODEL: qwen2.5:7b
# ── LLM backend (API — OpenAI-compatible) ─────────────
# Uncomment these to use a hosted API instead of Ollama
# NAT20_API_BASE_URL: https://api.openai.com/v1
# NAT20_API_KEY: "sk-..."
# NAT20_API_MODEL: gpt-4o-mini
# ── Summarization ─────────────────────────────────────
# Target words per chunk. Long transcripts are split into
# chunks, each summarized separately. Lower = more LLM
# calls but finer granularity. Higher = more context per
# chunk but may exceed the model's context window.
# Default 2500 works for most models (8K128K context).
# NAT20_CHUNK_WORD_TARGET: "2500"
# Campaign context injected into every summarization prompt.
# Inline string or path to a file inside the container.
# NAT20_WORLD_CONTEXT: ""
# NAT20_WORLD_CONTEXT_PATH: /data/campaign-context.txt
# Player recap format: story | diary | bullets | custom
# NAT20_PLAYER_RECAP_STYLE: story
# NAT20_PLAYER_RECAP_CUSTOM_PROMPT: ""
volumes:
# ── Data persistence ──────────────────────────────────
# Option A: Named volume (auto-managed, no host path needed)
- app_data:/data
# Option B: Host bind mount (replace with your path)
# - /mnt/media/dnd-sessions:/data
# HuggingFace + Torch model caches (avoid re-downloading)
- hf_cache:/root/.cache/huggingface
- torch_cache:/root/.cache/torch
@@ -35,7 +78,8 @@ services:
- "8000:8000"
frontend:
build: ./frontend
image: gitea.kansaigaijin.com/Jamie/Nat20-Notes/frontend:latest
# build: ./frontend
restart: unless-stopped
depends_on:
- backend