Skip to main content
Cloud Run can run a Bifrost HTTP gateway. This page shows how to configure its container port, external storage, health check, and scaling behavior.
Support level: Preview. The repository has Terraform resources with mocked provider tests, but no continuously exercised live Cloud Run deployment.

Compatibility summary

Cloud Run supports linux/amd64 for a multi-architecture image, matching the Bifrost release manifest.

Deploy Bifrost

This path stores both Bifrost stores in PostgreSQL 16 or later. It mounts config.json from Secret Manager outside /app/data, copies it into the writable application directory, and starts one Cloud Run instance. Cloud Run’s normal writable filesystem is ephemeral, so it cannot provide durable SQLite storage. Enterprise does not support SQLite on any filesystem. Use PostgreSQL 16 or later for configuration and logs that must survive revision or instance replacement.

Step 1: Set the deployment values

Step 2: Create config.json and its secret

If bifrost-config already exists, add a version with gcloud secrets versions add bifrost-config --data-file=config.json.

Step 3: Store credentials and deploy

The service account must already exist and be usable by the deployer. The database can be Cloud SQL or any reachable PostgreSQL service configured for version 16 or later.

Step 4: Verify

Platform requirements

  • Bind 0.0.0.0 on the configured target port.
  • Set a startup probe on /health and allow enough time for PostgreSQL migrations.
  • Choose a Cloud Run request timeout that covers the intended non-streaming and streaming requests. Requests that exceed it receive a platform 504.
  • Use instance-based billing/minimum instances if required background work must receive CPU outside requests; qualify this behavior for enabled Bifrost features.
  • Keep the service private until Bifrost authentication and public-access policy are configured.
  • Configure egress for model providers, PostgreSQL, MCP servers, and observability destinations.

Scaling

  • Keep OSS DB-managed deployment at max-instances=1.
  • File-only OSS replicas require identical immutable configuration on every revision and no shared SQLite state.
  • Do not enable Enterprise mesh ports/discovery on Cloud Run services.
  • For Enterprise broker mode, use the exact configuration and broker operational model supplied for the Enterprise release; see Enterprise Clustering.

Upgrade and troubleshooting

Deploy a new version as a revision, verify it, then shift traffic. Retain the prior revision for rollback; a revision rollback does not reverse database migrations.
  • Revision never becomes ready: check the port mapping, APP_HOST, database connectivity, migrations, and /app/data permissions.
  • Configuration disappears: the service relied on Cloud Run’s ephemeral filesystem.
  • Request returns 504: compare request duration with the configured Cloud Run timeout.
  • Background behavior pauses: verify CPU allocation/billing mode for idle instances.
  • Multiple OSS instances diverge: return to one instance or the file-only pattern.
Cloud Load Balancing, Cloud SQL, VPC egress, Secret Manager, custom domains, certificate management, Cloud Armor, and monitoring are optional Google Cloud implementations. Complete the deployment verification checklist.