Deploy, Monitor & Secure
Docker and systemd, health checks and metrics, and the security hardening checklist for a real launch.
Deploy
The repo ships deploy/: a Dockerfile, a systemd unit, an nginx config, and a gunicorn config.
docker build -f deploy/Dockerfile -t myapp .
docker run -p 8000:8000 --env-file .env myappMonitor
ops.enable(app) adds /healthz and /metrics (uptime, jobs, routes) for your load balancer and dashboards.
Secure
app.use(security.bot_filter())
app.use(security.RateLimiter(limit=60, window=60))
app.use(security.csrf_protect(secret=os.environ["SECRET"]))Launch checklist
- Strong secret from env; durable DB path; HTTPS; real provider.
- Rate limiter + bot filter + CSRF on; webhook signatures verified.
- Health/metrics wired to monitoring. Then โ ship it. โก