implement demo mode

This commit is contained in:
Nystik
2026-05-14 19:26:53 +02:00
parent e021993d61
commit ab89a94088
21 changed files with 1186 additions and 8 deletions

View File

@@ -0,0 +1,37 @@
# Public demo of Ignis.
#
# - Vaults live on tmpfs (RAM-backed, transient by design)
# - 20 MB total tmpfs, 700 KB per session, 3 vaults per session
# - 30-minute inactivity timeout, in-process cleanup
# - CORS proxy locked down to a known-safe domain allowlist
# - Obsidian account login blocked (proxy + UI)
services:
ignis-demo:
build:
context: ../..
ports:
- "8080:8080"
environment:
- DEMO_MODE=true
- DEMO_MAX_SESSIONS=20
- DEMO_VAULTS_PER_SESSION=3
- DEMO_SESSION_QUOTA_BYTES=716800 # 700 KB
- DEMO_TIMEOUT_MS=1800000 # 30 min
# Mount your own template at /app/demo-template to ship a richer
# starter vault without committing it to the repo. Defaults to the
# bundled server/demo-template/.
# - DEMO_TEMPLATE_DIR=/app/demo-template
- WRITE_COALESCE_MS=0 # tmpfs doesn't need debouncing
- PUID=1000
- PGID=1000
tmpfs:
- /vaults:size=20m,mode=1700
volumes:
- ./data:/app/data
- obsidian-app:/app/obsidian-app
# - ./my-demo-template:/app/demo-template:ro
restart: unless-stopped
volumes:
obsidian-app: