Deploy to Google Cloud Platform
Deploy a Terreno full-stack app to GCP: Cloud Run for the backend, GCS + Cloud CDN for the static web export.
Before you start
Read the deployment baseline — seven requirements (replica-set MongoDB, auth secrets, build-time EXPO_PUBLIC_API_URL, and more) apply to every provider.
Guides
| Guide | What it covers |
|---|---|
| Deploy backend to Cloud Run | Container image, Secret Manager, Cloud Run with session affinity |
| Deploy web to GCS + CDN | Static web export, bucket + CDN setup, cache invalidation |
| Build for web | Export command, EXPO_PUBLIC_API_URL, local verification |
Architecture
GCP deployment architecture — topology diagram, component roles, and tradeoffs (Cloud Run vs GKE, static vs SSR).
Scripts
scripts/setup-gcs-hosting.sh— parameterized GCS + CDN provisioning for one site
Environment variables
Environment variables reference — full list of backend and client config.
Legacy Flourish deployment
Flourish-specific infrastructure (hardcoded project IDs, CI deploy workflows) lives in infra/flourish/ and the existing demo-deploy.yml / frontend-example-deploy.yml workflows. New deployments should follow the generalized guides above with your own $PROJECT_ID and bucket names.