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:
gcloud builds submit --config infra/cloud-run/cloudbuild.yaml \
  --substitutions=_SERVICE=kuest-web,_REGION=us-central1,_SITE_URL=https://markets.example.com,_STORAGE_MODE=supabase
S3 mode example:
gcloud builds submit --config infra/cloud-run/cloudbuild.yaml \
  --substitutions=_SERVICE=kuest-web,_REGION=us-central1,_SITE_URL=https://markets.example.com,_STORAGE_MODE=s3,_S3_ENDPOINT=https://s3.example.com,_S3_REGION=us-east-1,_S3_FORCE_PATH_STYLE=true

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

Scheduler

If you are not on Supabase mode, create Cloud Scheduler jobs that follow Scheduled Jobs.
Do not create Cloud Scheduler jobs when Supabase mode is already using pg_cron.

Optional Terraform

cd infra/terraform/environments/production/cloud-run
cp terraform.tfvars.example terraform.tfvars
terraform init
terraform plan
terraform apply