Add WSGI entry point and gunicorn; default debug off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X9jG4CUFcH6n4vFvgtwndY
This commit is contained in:
emfurst 2026-10-17 12:17:54 -04:00
commit 4c5ba24a1d
5 changed files with 29 additions and 1 deletions

View file

@ -69,6 +69,14 @@ uv run admin-analytics dashboard
Opens at [http://localhost:8050](http://localhost:8050). Use `--port` to change the port, or `--host 0.0.0.0` for network access (e.g. over Tailscale).
For a production server, run it under gunicorn instead of Dash's development server:
```bash
uv run gunicorn -w 2 -b 127.0.0.1:8050 admin_analytics.dashboard.wsgi:server
```
Each worker opens its own read-only DuckDB connection. Don't use `--preload`, which would share one connection across forked workers.
The dashboard must be restarted to pick up newly ingested data (DuckDB opens in read-only mode to avoid lock conflicts).
The dashboard has eight tabs: