Codifies the local-smoke setup so future inspection of the l4d2web UI
on macOS is reproducible without a real deploy. Sets the
production-equivalent env vars the systemd unit normally gets from
/etc/left4me/*.env:
- SECRET_KEY (dev placeholder)
- DATABASE_URL → .tmp/dev-server/l4d2web.db (gitignored)
- LEFT4ME_ROOT → .tmp/dev-server (so overlay-mkdir doesn't try
/var/lib/left4me, which is read-only on macOS dev)
- SESSION_COOKIE_SECURE=0 so cookies survive http://127.0.0.1
- JOB_WORKER_ENABLED=false so the background worker doesn't shell out
to the sudo-requiring production l4d2ctl
Runs alembic upgrade head. On first run, auto-seeds:
- admin user 'dev' / 'devdevdev' (password chosen to satisfy the ≥8
char policy in l4d2web/auth.py:validate_new_password)
- one blueprint with example srccfg content (exercises the
highlighter + autocomplete)
- one script overlay with bash (exercises the bash highlighter)
- one files overlay with a test.cfg (exercises the files-editor
modal + language dropdown)
- one server linked to the blueprint (exercises the server detail
page rendering, though deploy actions still fail)
Starts Flask with --debug so code + template changes auto-reload.
Stub l4d2ctl for server-deploy actions is deliberately out of scope;
documented in the script's docstring.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>