Architecture decision
ADR-016: Start on one VPS
An intentionally small deployment topology, with explicit availability and recovery limits.
Context
Ask Habib is an engineering portfolio that will grow into searchable, evidence-backed answers about its author’s work. The first release contains a static page and a small health API. There is no measured traffic or availability requirement that calls for multiple application hosts yet.
The project needs a production path that can be understood, tested, and recovered while its content and application behavior are still being built. Infrastructure should leave room for those tasks rather than become the main product.
Decision
Run the initial application on one VPS using Docker Compose. Keep the static web server, API, and tunnel connector as separate containers with explicit network boundaries. Build and test images outside production, deploy immutable references, and keep a known previous release available for rollback.
The architecture places the future database on this host too, but the first deployment does not include a database. Data recovery must be designed and tested before persistent application data is introduced. Cloudflare is an external dependency; future AI-provider calls will be another external dependency.
Alternatives considered
Multiple application hosts could reduce the effect of one machine failing, but would also require routing, deployment coordination, and a clearer state and recovery design. That work needs an availability objective to justify it.
A managed application platform could take over parts of host maintenance. It remains a valid alternative if operating the VPS becomes a larger burden than the control and learning value it provides.
Cluster orchestration is deferred. The current system has no demonstrated need for cross-host scheduling or independent service scaling.
Consequences
One host gives the project a small set of resources and deployment artifacts to inspect. Compose is the service definition and the deployment unit. This keeps the first operational model concrete without making it highly available.
A host failure can take down the entire origin. Resource contention, disk capacity, host security updates, and recovery remain responsibilities of the project. A container restart policy does not protect against the host being unavailable. Immutable images help application rollback; they do not replace database backups or prove that a future schema change can be reversed.
Revisit when
Reconsider the topology when measured resource pressure persists after ordinary optimization, when a stated availability objective exceeds this host’s recovery capability, or when stateful recovery and deployment requirements demand isolation. Record the requirement and evidence before selecting the replacement topology.
Related decision
Use Cloudflare Tunnel for ingress explains how public traffic reaches the application without exposing the origin services.