Skip to main content

Prerequisites

  • GCP project with billing enabled
  • gcloud installed and authenticated
  • Cloud Build, Artifact Registry, Cloud Run Admin, and Secret Manager APIs enabled
  • An Artifact Registry Docker repository matching the repository and region selected for your deployment
  • Permissions for Cloud Build to push images and deploy, and for the Cloud Run runtime service account to access the referenced secrets
  • Base values from Environment Variables
  • A storage profile from Manual Installation Overview

Build and deploy

The Cloud Run path uses infra/cloud-run/cloudbuild.yaml, which builds from infra/docker/Dockerfile, pushes the image to Artifact Registry, and deploys the service. Before submitting, set CHAIN_ID for the intended network in the deploy step’s environment values. Add any other runtime overrides from Environment Variables there or to the secret bindings as appropriate. Create the secrets listed below before deployment. For manual submissions, supply SHORT_SHA explicitly because the image tag uses it. Repository-triggered builds can supply this value automatically. Supabase mode example:
S3 mode example:

Secrets to create in Secret Manager

  • POSTGRES_URL
  • CRON_SECRET
  • BETTER_AUTH_SECRET
  • REOWN_APPKIT_PROJECT_ID
  • ADMIN_WALLETS
  • KUEST_ADDRESS
  • KUEST_API_KEY
  • KUEST_API_SECRET
  • KUEST_PASSPHRASE
Add either:
  • SUPABASE_URL and SUPABASE_SECRET_KEY
or:
  • S3_BUCKET
  • S3_ACCESS_KEY_ID
  • S3_SECRET_ACCESS_KEY

Migrate and verify

The supplied Cloud Build file builds and deploys the application, but it does not run database migrations. Run bun run db:push from a secured checkout with the production database connection, SITE_URL, CRON_SECRET, and selected storage profile before opening traffic. Use POSTGRES_URL_NON_POOLING when the runtime URL uses transaction pooling. After deployment, verify the latest revision is serving successfully and open the canonical SITE_URL. If you use S3 mode, or Supabase mode without active database sync jobs, configure Scheduled Jobs.

Scheduler

If the supplied database jobs are not active, create Cloud Scheduler jobs that follow Scheduled Jobs.
Do not create Cloud Scheduler jobs while the same routes are already scheduled through pg_cron.

Optional Terraform