Module 20: Deploying to Google Cloud with CI/CD
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
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.