mirror of
https://github.com/ZTatman/myst.git
synced 2026-11-20 20:07:59 +00:00
Replace manual .env configuration with a browser-based setup wizard. New users deploy with `docker compose up` and configure Forgejo OAuth credentials through /setup on first visit. Existing users can reconfigure via the same page (auth-gated post-setup). Key changes: Rename (Myst → Firebreak): - Config fields, env vars, session cookie, templates, docker-compose, README all renamed from Myst to Firebreak Setup wizard (/setup): - New AppSettings single-row DB table stores Forgejo config - Auto-generates Fernet encryption key on first setup - SetupRequiredMiddleware redirects all routes to /setup pre-config - Reconfigure mode pre-fills existing values, requires auth - Landing page links to /setup for recovery if OAuth breaks Settings page (/settings): - PAT registration moved out of dashboard into dedicated page - Token card with registration date, delete, and update actions - Dashboard shows CTA linking to settings when no PAT registered Auth updates: - Routes use AppSettings from DB instead of env-based Settings - OAuth callback redirects new users to /settings for PAT setup - Forgejo API errors no longer leak upstream response bodies - Decrypt failures return actionable 503 instead of unhandled 500 Code quality: - Extracted templating.py to eliminate circular import hacks - AppSettings.get_fernet() caches Fernet cipher instance - User.has_pat property replaces scattered None checks - lookup_session promoted to public API - Dead code removed, return type annotations added - PAT input fields use type="password" - CSRF gap documented in agents.md for future addressing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
835 B
YAML
40 lines
835 B
YAML
services:
|
|
web:
|
|
build:
|
|
context: ./web
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
env_file: ./web/.env
|
|
environment:
|
|
- DATABASE_URL=postgresql+asyncpg://firebreak:firebreak@db:5432/firebreak_db
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: firebreak
|
|
POSTGRES_PASSWORD: firebreak
|
|
POSTGRES_DB: firebreak_db
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U firebreak -d firebreak_db"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
adminer:
|
|
image: adminer:latest
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres_data:
|