Overview
This guide walks you through deploying the MergeWatch container image to Cloud Run, connecting it to a Cloud SQL PostgreSQL instance, and configuring your GitHub App webhook to point at the Cloud Run service URL.Prerequisites
1
Install the Google Cloud CLI
Install and authenticate the
gcloud CLI.2
Enable required APIs
3
Gather your GitHub App credentials
You need the following values from your GitHub App settings:
4
Choose an LLM provider
Set
LLM_PROVIDER to your preferred provider (e.g. anthropic, openai, bedrock). For the default Anthropic provider, you also need ANTHROPIC_API_KEY.Deploy to Cloud Run
1
Create the Cloud Run service
Deploy the MergeWatch container image with all required environment variables.
2
Note the service URL
After deployment, Save this URL — you will need it to configure the webhook.
gcloud prints the service URL:Set up Postgres
MergeWatch requires a PostgreSQL database to store installation and review data.Cloud SQL (recommended)
Fully managed PostgreSQL with automatic backups, high availability, and private networking to Cloud Run.
AlloyDB
PostgreSQL-compatible managed database for high-throughput workloads. Use if you need advanced analytics or larger scale.
1
Create a Cloud SQL instance
2
Connect Cloud Run to Cloud SQL
Add the Cloud SQL connection to your Cloud Run service:
Cloud Run connects to Cloud SQL over a Unix socket, so the
DATABASE_URL uses the /cloudsql/ prefix instead of a TCP host.Configure the webhook URL
Set the webhook URL on your GitHub App to point at your Cloud Run service./webhook.
Next steps
Configure review behavior
Tune sensitivity, ignored paths, and review focus areas.
Environment variables
Full list of supported environment variables.
Troubleshooting
Common issues and how to fix them.
Upgrading
How to update MergeWatch to the latest version.