liveBook · Manning

Cloud Run

As explained in Vibe Engineering

Google Cloud Run is a managed platform for running containerized applications in a serverless execution environment.

Cloud Run deploys containerized applications as managed serverless services. It supports a provider-neutral application boundary, but deployment still requires deliberate choices about image storage, credentials, region, and authentication. section 6.4.4 section 6.4.3

A disciplined deployment keeps infrastructure changes separate from production code and makes risky defaults explicit:

  • Build the application into a container image with a multi-stage Dockerfile using Maven and Java 17. section 6.4.4
  • Push the image to Google Artifact Registry rather than the deprecated Container Registry. section 6.4.4
  • Store API keys in Google Cloud Secret Manager instead of passing them through plain environment variables. section 6.4.4
  • Configure the project, region, service name, provider, and access policy through explicit gcloud deployment commands. section 6.4.4

Deploying a provider-flexible service

A Java service is packaged into a container, uploaded to a regional Artifact Registry repository, and deployed to Cloud Run with the Gemini provider selected. The API key is exposed to the service through a named secret, while unauthenticated access is enabled for the demonstrated endpoint. Successful output confirms revision creation, traffic routing, and the service URL. section 6.4.4 section 6.4.3

Listing 6.23 Deploy application to Cloud Run
gcloud run deploy sql-generator-service \
--image europe-west1-docker.pkg.dev/aqueous-flames-478114-b5/[YOUR_REPO]/sql-generator-service \
--platform managed \
--region europe-west1 \ #A
--allow-unauthenticated \
--set-env-vars=AI_PROVIDER=gemini \
--set-secrets=GOOGLE_AI_API_KEY=gemini-api-key:latest #B

Inspect the complete Cloud Run deployment command, including the managed platform, region, public access setting, provider variable, and secret binding. section 6.4.4

How Vibe Engineering covers it

How deep it goes
Shows container creation, image publishing, secret configuration, deployment, and success verification, without detailing Cloud Run internals.
Examples
Uses a Java service, a multi-stage Dockerfile, Artifact Registry commands, Gemini configuration, secret creation, and Cloud Run deployment output.
What it assumes
Assumes a containerizable application and Google Cloud authentication, while supplying the project setup and deployment commands.
What you can do after
Operate/configure a containerized service on Cloud Run with regional deployment, provider selection, secret binding, and traffic routing.
How it connects
Connects containers, Docker, Maven, Java, Artifact Registry, Secret Manager, gcloud, serverless execution, and AI provider configuration.

Also explained in

Compare how 2 books explain Cloud Run →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.