Skip to main content

Prerequisites

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. 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_SERVICE_ROLE_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 pnpm db:push from a secured environment with the production POSTGRES_URL, SITE_URL, and CRON_SECRET before opening traffic. After deployment, verify the latest revision is serving successfully and open the canonical SITE_URL. If the database does not have both pg_cron and pg_net with the supplied jobs active, 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