Deployment Patterns ๐ข
Patterns shared across all RMM self-hosted deployments.
Canonical shapeโ
Internet โโโถ nginx (TLS + rate limits) โโโถ Docker Compose services โโโถ Postgres/Redis/Qdrant
Naming & versionsโ
- Deploy from git tags, never from branch tips.
- Pin image versions in compose;
:latestis forbidden in production. - One directory per stack:
docker-compose.yml+.env.example+README.md.
Zero-downtime upgradesโ
- Pull tag, build image alongside running container (
docker compose build). - Run migrations (idempotent, expand/contract pattern).
- Recreate services one at a time behind the proxy (
docker compose up -d --no-deps <svc>). - Smoke-test health endpoints; roll back by re-pointing compose to previous tag.
Backupsโ
| Data | Cadence | Retention |
|---|---|---|
| Postgres | Nightly dump + weekly restore test | 30 days local, 90 days offsite |
| Redis | RDB snapshot (cache data โ rebuildable) | 7 days |
| Qdrant | Snapshot weekly | 4 weeks |
| Secrets store | Encrypted export weekly | offsite |
Restore tests are mandatory weekly. An untested backup is a hope, not a backup.