Cloud Run runs a single container per request, scales to zero by default, and forwards HTTPS. The standalone is designed to fit.Documentation Index
Fetch the complete documentation index at: https://docs.idun-group.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Set up Cloud SQL (Postgres)
The standalone uses SQLite by default; on Cloud Run that disappears between revisions. Use Cloud SQL Postgres:2. Store secrets in Secret Manager
3. Build & push
UseDockerfile.example as a starting point:
4. Deploy
Copy the template into your deploy directory, then edit it:metadata.annotations."run.googleapis.com/cloudsql-instances"— attaches the Cloud SQL instance to the service. Required for the unix-socket formhost=/cloudsql/PROJECT:REGION:idun-postgresinDATABASE_URL.spec.template.metadata.annotations."run.googleapis.com/cloudsql-instances"— same value at the revision level. Cloud Run requires both for new revisions to inherit the connection.
minScale: "1"— eliminates cold starts and keeps the trace retention scheduler running.cpu-throttling: "false"— keeps the trace writer flushing between requests.- 1 GiB memory, 1 vCPU is plenty for a small agent.
Caveats
- MCP servers using
command: docker run …won’t work on Cloud Run. Switch totransport: stdiowith a binary command (e.g.npx,uvx, a precompiled binary) or use HTTP transport pointing at another Cloud Run service. - Trace retention purge runs hourly via APScheduler — when Cloud Run scales to zero the scheduler stops too. With
minScale: "1"it runs continuously. - Cookies need
Secure— Cloud Run’s load balancer setsX-Forwarded-Proto: https. The standalone honors that automatically.
Next steps
Production hardening
Lock down admin auth, TLS, secrets, and trace retention before exposing the service.
GCP Trace
Send distributed traces to the same Google Cloud project.
GCP Logging
Stream structured logs to Cloud Logging from the running service.