Bastien Chanot
|
98117b3b7f
|
docs: add DEPLOY.md — VPS deploy guide (Docker + nginx + Certbot)
Production deploy playbook for Osteo Report. Single nginx:alpine
container behind a host reverse proxy; no backend, no database, no
server-side state. Praticien data lives in the browser and in the
exported PDFs themselves.
Sections cover:
- Topology + container/host port table.
- Required environment (.env): APP_SITE_NAME / BRAND_NAME /
FOOTER_NAME / TAGLINE + optional PORT. No secrets.
- VPS provisioning (Ubuntu 24.04 LTS, 1 vCPU / 1-2 GB RAM, DNS,
baseline apt packages).
- Firewall — cloud provider security group + UFW on the VM, with
explicit "do NOT expose 8080" note.
- Docker install + tuned daemon.json (json-file log driver capped
10MB × 5, live-restore).
- First-time setup, routine deploys via `git fetch + reset --hard
origin/master + docker compose up --build -d`.
- Data persistence + backups: just the .env file (no volumes).
Daily cron + retention + off-VPS sync.
- TLS reverse proxy — Option A (host nginx + Certbot with security
headers HSTS/XFO/XCTO/Referrer-Policy/Permissions-Policy/CSP),
Option B (Caddy auto-TLS Caddyfile).
- Sanity checks — TLS redirect, env.js cache headers, no-public-8080
verification via nc + nmap.
- Hardening — non-root deploy user, disable root + password SSH,
optional SSH port move, unattended security upgrades, fail2ban,
external lockdown nmap.
- Rollback (git reset + rebuild — no data to restore).
- Health checks table, troubleshooting (9 common failures with
recipes), operational notes (log destinations, manual prune,
provider-specific RAM hints).
README.md DEPLOY.md link now points at a real document.
|
2026-05-21 04:13:28 +02:00 |
|