ADR 001
One VPS with Docker Compose and Traefik, not Kubernetes
Context
I needed to host a growing set of small apps: static sites, Node apps with a Postgres each, a blog, analytics and a workflow engine. Expected traffic was low and spiky, the budget was personal, and one person had to run it with no operations team. New apps had to go from idea to live HTTPS in minutes.
Options considered
| Option | For | Against |
|---|---|---|
| Managed Kubernetes (EKS, AKS, GKE) | Industry standard, self-healing, scales out | Control-plane fee alone costs more than this whole platform; days of YAML, ingress and cert-manager for no benefit at this scale |
| k3s on the VPS | Kubernetes skills, free | Uses about 0.5–1 GB of the 8 GB RAM; one node gives no real high availability, so you pay the complexity without the payoff |
| PaaS or serverless (Vercel, Render, Cloud Run) | No servers to run | Per-app pricing and database add-ons multiply across 18 services; cold starts; data spread over several vendors |
| One VPS, Docker Compose per app, Traefik | Fixed cost; every app isolated in its own containers and network; Traefik finds new apps from labels and gets certificates automatically | A single host is a single point of failure; scaling is vertical only; I patch the OS |
Decision
Each app is a Docker Compose project in its own folder, with its own network and, where needed, its own Postgres. One Traefik instance routes every subdomain of the main domain by Docker labels and issues Let's Encrypt certificates. A wildcard DNS record means a new subdomain needs no DNS change.
Consequences
- Good: 27 containers use under 2 GB of RAM. Static sites take about 3 MB each, Node apps about 35 MB, each Postgres about 30 MB. The heaviest are n8n and the blog's MySQL, at about 450 MB each.
- Good: a new app needs three files (Dockerfile, compose file, workflow) and one setup command.
- Good: no lock-in. Everything is plain Docker images that would run on any host or cluster.
- Cost: no high availability. A host failure takes every app down until it is rebuilt from Git plus backups. That's acceptable for these apps; see gaps.
- Cost: one database per app costs some RAM, but it buys blast-radius isolation and per-app backups.
Revisit when
- Any app needs an uptime target above about 99.5%, or zero-downtime deploys.
- RAM use stays above about 70%, or one app's load affects the others.
- More than one team deploys to the platform and needs quotas or RBAC.
At bank scale
Different answer: managed Kubernetes across at least two availability zones, GitOps through Argo CD, a service mesh or mTLS between services, managed Postgres with point-in-time recovery, and a platform team offering a "golden path" template. The principle stays the same: one standard, repeatable way to ship an app. Only the substrate changes.