Infrastructure
Compute, cloud resources, provisioning, secrets, observability, and deployment.
The Infrastructure domain covers the runtime environment where Trovella runs: the Compute Engine VM, Docker containers, reverse proxy, networking, cloud resources, secret management, and observability.
Topics
Compute
VM configuration, Docker Compose container architecture, Caddy reverse proxy, firewall rules, DNS, and VM operational procedures.
Secrets & Configuration
GCP Secret Manager, environment variables across all environments, the VM secret sync script, CI secret access via Workload Identity Federation, and rotation procedures.
Observability
Structured logging via Pino, error tracking via Sentry, health checks, Cloud Logging integration, and local debugging.
Key Infrastructure
| Component | Role |
|---|---|
| Compute Engine VM | Single host for all Trovella services (e2-custom-2-6144, 2 vCPU, 6 GB RAM) |
| Docker Compose | Container orchestration for Caddy, Next.js, Typesense, Inngest, Cloud SQL Proxy |
| Caddy | Reverse proxy with automatic TLS, HTTP/3, www redirect |
| Cloud SQL | Managed PostgreSQL 18 with pgvector (see Data & Storage) |
| Upstash Redis | Cache layer (see Caching) |
| GCP Secret Manager | Application secret storage, synced to VM at deploy time |
| Terraform | Infrastructure-as-code for all GCP resources |
Cross-Domain References
- Data & Storage -- database schema, caching, and background jobs that run on this infrastructure
- Delivery -- CI/CD pipeline that builds and deploys to the VM
- Identity & Access -- authentication and authorization configured through these services