Platforms
Deploying to Google Cloud Run
Deploy your RivetKit app to Google Cloud Run.
Steps
Prerequisites
- Google Cloud project with Cloud Run and Artifact Registry enabled
gcloudCLI authenticated (gcloud auth login) and project set (gcloud config set project YOUR_PROJECT)- Artifact Registry repository or Container Registry enabled
- Your RivetKit app
- If you don’t have one, see the Quickstart page or our Examples
- Access to the Rivet Cloud or a self-hosted Rivet Engine
Package Your App
Create a Dockerfile in your project root:
Dockerfile
Build and Push the Image
Use Cloud Build to build and push the image. Replace the region and repository with your own.
Command Line
Set Environment Variables
After creating your project on the Rivet dashboard, select Google Cloud Run as your provider. You’ll be provided RIVET_ENDPOINT and RIVET_PUBLIC_ENDPOINT environment variables to use when deploying.
Deploy to Cloud Run
Deploy the service to Cloud Run, passing the Rivet environment variables. Adjust the region and image as needed.
Command Line
Connect to Rivet
- After deployment, note the service URL (e.g.
https://rivetkit-app-xxxxx-uc.a.run.app) - On the Rivet dashboard, paste your URL with the
/api/rivetpath into the connect form (e.g.https://rivetkit-app-xxxxx-uc.a.run.app/api/rivet) - Click “Done”
Verify
Confirm the service is running:
Command Line
Your app should appear as connected on the Rivet dashboard once the service reports ready.