2.1 KiB
2.1 KiB
Docker Service Deployment Standard (IT Pro Partner)
This reference documents the standard for deploying Docker services on ITP infrastructure.
Directory Structure
~/docker/<service-name>/
├── docker-compose.yml ← Pinned image tags (never :latest)
├── .env ← Secrets only (never in compose file)
├── data/ ← Persistent volumes on disk (backed up by S3)
├── CHANGELOG.md ← Every config change documented
Access: Tailscale-Only Standard
- Deploy compose in
~/docker/<service>/ - Verify local:
curl -s http://localhost:<port>/ - Open UFW:
ufw allow <port>/tcp - Enable Tailscale Serve for HTTPS:
tailscale serve --bg --https 443 --set-path / http://127.0.0.1:<port> - Set the service's base URL to
https://<hostname>.tail<random>.ts.net - Test from a Tailscale-connected device
- Close UFW port:
ufw delete allow <port>/tcp - Log:
bash ~/.hermes/scripts/changelog.sh "Networking" "Tailscale Serve for <service> at https://..."
Vaultwarden-Specific Notes
- DOMAIN env var must match the access URL exactly. Wrong protocol (http vs https) causes the web vault to hang on a spinner silently.
- Registration is disabled by default (
SIGNUPS_ALLOWED=false). Enable it temporarily for first-user setup, then lock it. - Admin panel at
/adminuses theADMIN_TOKENfrom.env. - Tailscale hostname with
0vsOconfusables: the Bitwarden mobile app may silently corrupt zero characters in the URL during text input. Fix: rename the Tailscale node before deploying:tailscale set --hostname vaultwarden. Then re-create Tailscale Serve (turn off, re-enable — it picks up the new hostname). No zeros, no letter-O confusion. - Bitwarden app fails with "not a recognized Bitwarden server": always the DOMAIN/access-URL mismatch. Verify via
curl https://<url>/api/config— theidentityfield must match exactly what the app connects to.
Backup
- Compose files and .env are synced to S3 every 15 min via
hermes-live-sync - For data directories: same sync includes
~/docker/*/data/* - RPO: < 15 min for both config and data