ADR-001: Cloud Provider & Container Hosting Choice
Context
A highly scalable, cloud-native hosting platform is required to support the bilingual portfolio, secure backend integrations, and a suite of resource-intensive GenAI showcases.
Key operational requirements include:
1. Minimizing idle standby costs to absolute zero ($0.00/month at rest).
2. Bypassing infrastructure maintenance workloads (zero OS patching, VM updates, or cluster administration).
3. Guaranteeing sub-second container cold-starts when a new visitor arrives.
Decision
Standardize entirely on Google Cloud Platform (GCP) specifically leveraging Google Cloud Run and Artifact Registry.
Cloud Run provides a request-driven serverless container runtime with native scale-to-zero capabilities. When idle, replica counts drop to absolute zero, halting CPU and memory billing. Artifact Registry acts as the private container repository, integrated securely with keyless OIDC pipeline pushes and minimal permissions policy scopes.
Amended (2026-10-16): the runtime image is distroless (ADR-022), not Alpine. Static assets are now served by Firebase Hosting, which rewrites every other path (the HTML document included) to Cloud Run (ADR-027). This partly reverses the original rejection of static SPA hosting: the API and the HTML still need the server, but immutable assets no longer wake the container.
Amended 2026-10-22: in production a Cloud Scheduler job pings /api/health every 10 minutes, so an instance is usually warm. It costs effectively nothing; one always-on instance would guarantee it at about $12–15/month.
Amended 2026-11-01: keep-warm was consolidated into multi-region Cloud Monitoring uptime checks (Europe, US, Asia every 5 minutes), removing the dedicated Cloud Scheduler resource.
Consequences
Benefits:
* Bypasses idle infrastructure costs, fitting comfortably inside GCP's monthly free tiers.
* Simplifies operations by leveraging native GCP IAM identity-based access, completely eliminating static API keys or service account JSON files from the repository.
* Enforces strict scaling thresholds (min-instances: 0; max-instances: 3 in prod, 1 in dev) to prevent billing surges during traffic spikes or denial-of-service attempts.
Alternatives considered
1. AWS ECS Fargate: Rejected due to a lack of true scale-to-zero capabilities, which would introduce a permanent monthly running cost for idle resources.
2. Azure Container Apps: Rejected due to complex virtual network requirements and higher minimum standby fees.