Available environments
production/gkeproduction/kubernetesproduction/cloud-runproduction/railwayproduction/flyproduction/digital-ocean
Typical workflow
Target notes
GKE Autopilot
GKE Autopilot
Creates the Kubernetes cluster itself. After apply, fetch credentials with
gcloud container clusters get-credentials.Kubernetes
Kubernetes
Deploys app resources into an existing cluster, such as one created by the GKE target. Edit the module call in
main.tf to replace the example ingress hostname and TLS secret. Pass CHAIN_ID for the intended network through the module’s app_env values.Cloud Run
Cloud Run
Requires Secret Manager secrets to exist before apply.
Railway
Railway
Runs
railway up --ci through local-exec against an existing Railway project and service. Install and authenticate the Railway CLI first, and configure runtime secrets in Railway.Fly.io
Fly.io
Uses
flyctl deploy via Terraform local-exec. Secrets are still managed manually in Fly.io.DigitalOcean
DigitalOcean
Requires
DIGITALOCEAN_TOKEN and repository access configured in App Platform.General rules
- Use immutable image refs whenever possible.
- Point
SITE_URLto the public canonical endpoint. - For Cloud Run, Kubernetes, and DigitalOcean, provide core secrets plus exactly one storage profile. Cloud Run and DigitalOcean accept
CHAIN_IDthroughapp_envin the environment configuration; Kubernetes requires passingapp_envto the module as described above. - Keep
terraform.tfvarsand state files private. Targets that accept secret values can store them in Terraform state even when marked sensitive. - Terraform does not run database migrations for the Cloud Run, Kubernetes, DigitalOcean, or Fly targets. Run
bun run db:pushwith the production connection before exposing a release. Railway uses the pre-deploy command in its deployment configuration. - Keep scheduler behavior aligned with Scheduled Jobs.