Deploy
Deploying to Google Cloud Run
Run your backend on Cloud Run with a lightweight container image and one command deploy.
Guide
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 backend application repository
Generate Environment Variables
Navigate to Rivet and click Connect > Manual. Copy the environment variables provided, they will be used when deploying. They should look something like this:
Command Line
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
Deploy to Cloud Run
Deploy the service to Cloud Run, passing the Rivet environment variables. Adjust the region, image, and VPC connector settings as needed.
Command Line
You do not need to expose a container port. Rivet tunnels traffic directly to your backend.
Verify the Runner
Confirm the service is running:
Command Line
Your runner should appear as connected on the Rivet dashboard once the service reports ready.