ProjectBuild an Agentic Content Studio: the explanation · Module 20: Deploying to Google Cloud with CI/CD · part 22 of 22
Part 22 · Module 20: Deploying to Google Cloud with CI/CD

Module 20: Deploying to Google Cloud with CI/CD

23 min read·
About 45 minutes · Needs: Module 19 (the containers and images), Module 13 (jobs and progress streams), Module 16 (security, rate limits and secrets) · Code: deploy/terraform/main.tf, deploy/terraform/run.tf, deploy/terraform/variables.tf, deploy/terraform/cicd.tf, deploy/deploy.sh, deploy/cloudbuild.yaml, .github/workflows/ci.yml, .github/workflows/deploy.yml

Where this fits

WHERE THIS FITS Slidesmith Studio this module BROWSER React FRONT DOOR AND API nginx, FastAPI BACKGROUND AGENTS LangGraph MODELS Ollama RENDERING Playwright DATA Postgres 17 OPERATIONS evals, Docker, Cloud Run Studio app React pages /render page same renderer nginx proxy, headers Auth sessions, CSRF Brand kit onboarding, uploads Projects deck spec, edits Job runner progress over SSE Research search, facts Strategist outline Designer slide JSON Check fit, else repair LangGraph pipeline state graph, JSON repair Ideas post ideas from pillars qwen3.8:27b Ollama, local GPU Web search Ollama API Chromium render, measure Exports PDF, PNG, ZIP, HTML PostgreSQL users, decks, jobs Uploads disk or GCS Evaluation suites, gate Insights usage, timings Containers Docker Compose Deploy Cloud Run, CI/CD
The deploy (blue) takes the two container images to Cloud Run, with managed Postgres and a bucket for uploads; the model (amber) becomes a hosted copy.

Module 19 runs the studio as Docker containers on one Mac. This module puts the same two images on Google Cloud: two Cloud Run services, a managed PostgreSQL, a private bucket for uploads, secrets in Secret Manager, and a hosted copy of the model. Every commit that passes the tests on main is then deployed by GitHub Actions without any stored Google key.

Status, first. The deployment code was written to mirror the Medilane project's deployment, which passes terraform validate. This Terraform has not been validated (Terraform was not installed where it was written) and has never been applied to a real Google Cloud project. Everything below describes what the code says; nothing here was measured in the cloud.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan