Trovella Wiki

Deployment Overview

How code reaches production -- the deploy pipeline, environment strategy, rollback procedures, and post-deploy verification.

Trovella uses a merge-to-main deployment model. Merging a pull request to main triggers the full CI/CD pipeline, which builds a Docker image, optionally runs database migrations, and deploys to a single Compute Engine VM via SSH. There is no manual deploy step.

How It Works

  1. A PR is merged to main
  2. The quality CI job validates the code (lint, typecheck, test, build)
  3. If database schema files changed, migrate-prod applies migrations to Cloud SQL
  4. build-push builds a Docker image and pushes it to Artifact Registry
  5. deploy-prod SSHs into the production VM, syncs secrets, pulls the image, and restarts containers
  6. The health endpoint confirms the deploy succeeded

Total time from merge to live: 5--10 minutes.

Production Stack

The production VM runs five Docker containers via docker-compose.prod.yml:

ContainerImageRole
caddycaddy:2-alpineReverse proxy, automatic TLS (Let's Encrypt), HTTP/3
webtrovella/web:latestNext.js standalone app (port 3000)
cloud-sql-proxyCloud SQL Auth Proxy 2.21Tunnels database connections to Cloud SQL
typesensetypesense/typesense:27.1Search engine (port 8108)
inngestinngest/inngest:latestBackground job orchestrator (port 8288)

Caddy is the only container with external ports (80, 443). All other services communicate on the Docker network.

Pages in This Topic

Cross-Domain References

On this page