Some checks failed
Build and Push / build (push) Failing after 17s
Backend:
- password hashing via hashlib.scrypt
- stateless HMAC-SHA256 tokens (7-day expiry)
- POST /api/auth/login, /api/auth/register (admin), /api/auth/reset-password
- admin user created from NAT20_ADMIN_USERNAME/PASSWORD on first startup
- users table, campaign_shares table, created_by on campaigns
- require_user dependency on all routes except auth
- campaign sharing: GET/POST/DELETE /api/campaigns/{id}/shares
Frontend:
- AuthContext: user/token state, login/logout, global fetch Auth header
- Login page, Users page (admin user management)
- route protection, sidebar user info/sign out
Docker/CI:
- split backend/Dockerfile into thin app-only image
- backend/Dockerfile.deps builds the heavy WhisperX/PyTorch base
- CI builds deps only when requirements.txt changes
- docker compose pull now fetches ~100KB app layer instead of 3.5GB
75 lines
2.7 KiB
YAML
75 lines
2.7 KiB
YAML
# 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:
|
|
backend:
|
|
# ── Pre-built image (pull from registry) ──────────────────
|
|
image: gitea.kansaigaijin.com/Jamie/Nat20-Notes/backend:latest
|
|
# ── Or build locally after make deps (uncomment below) ────
|
|
# build: ./backend
|
|
|
|
restart: unless-stopped
|
|
environment:
|
|
# ── Auth ────────────────────────────────────────────────
|
|
NAT20_ADMIN_USERNAME: "admin"
|
|
NAT20_ADMIN_PASSWORD: "admin"
|
|
|
|
# ── Setup wizard ──────────────────────────────────────
|
|
# "false" (or omit) to show the wizard on first run.
|
|
# Set to "true" after onboarding completes.
|
|
NAT20_ONBOARDING_COMPLETED: "false"
|
|
|
|
# ── Transcription ─────────────────────────────────────
|
|
NAT20_WHISPER_MODEL: medium
|
|
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 ─────────────────────────────────────
|
|
# NAT20_CHUNK_WORD_TARGET: "2500"
|
|
# NAT20_WORLD_CONTEXT: ""
|
|
# NAT20_WORLD_CONTEXT_PATH: /data/campaign-context.txt
|
|
# NAT20_PLAYER_RECAP_STYLE: story
|
|
# NAT20_PLAYER_RECAP_CUSTOM_PROMPT: ""
|
|
|
|
volumes:
|
|
- app_data:/data
|
|
- hf_cache:/root/.cache/huggingface
|
|
- torch_cache:/root/.cache/torch
|
|
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
frontend:
|
|
image: gitea.kansaigaijin.com/Jamie/Nat20-Notes/frontend:latest
|
|
# build: ./frontend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
ports:
|
|
- "8020:8020"
|
|
|
|
volumes:
|
|
app_data:
|
|
hf_cache:
|
|
torch_cache:
|