| name | deploying-to-cloud-run |
| description | Explains and deploys the app to Google Cloud Run with simple language, secrets, CORS, and proof steps, and is used when the hackathon build needs a live Google Cloud deployment. |
Gets the app live on Google Cloud Run in the simplest judge-friendly way, with plain-English explanations throughout.
Use this skill when
- The backend must be deployed to Google Cloud.
- The PM needs deployment concepts explained simply.
- Secrets, environment variables, and CORS must be configured safely.
- The team needs proof of Google Cloud usage for hackathon judges.
Plain-English concept guide
- Docker: a shipping box for your app. It packs your code and setup into one thing.
- Cloud Run: Google opens the box, runs it, and gives you a public URL.
- Secret / environment variable: a password or key stored safely outside the code.
- CORS: permission for your frontend website to talk to your backend website.
Capabilities
- Prepares a backend container for Cloud Run.
- Explains deployment steps in non-technical language.
- Sets environment variables and secrets safely.
- Configures CORS for the frontend URL.
- Verifies health and public accessibility.
- Collects proof artifacts for judges.
Recommended simple path
Deploy the FastAPI backend to Cloud Run first. That alone satisfies the Google Cloud requirement clearly.
Only deploy the frontend to Cloud Run too if:
- time remains
- it simplifies the demo
- the team wants one hosting story
Workflow
- Explain the plan simply. Example: "We are putting the backend into a deployable box and asking Google to host it."
- Prepare the backend for containers.
- add Dockerfile
- add .dockerignore
- ensure the app binds to the PORT environment variable
- Confirm config is externalized.
- API keys in env vars
- no secrets in code
- Deploy to Cloud Run.
- Set CORS. Allow the frontend origin to call the backend.
- Test the live service.
- open GET /health
- test POST /story/start
- Capture proof for judges.
- Cloud Run service URL
- screenshot of Cloud Run dashboard
- terminal deployment command output
- quick live demo clip hitting the service
- Write down the deployment steps in the README.
Deployment checklist
- Backend runs locally
- GET /health returns success
- Secrets are not in the repo
- CORS includes the frontend origin
- Public Cloud Run URL works
- Screenshots and proof saved
Common pitfalls
- Hardcoded API keys
- App not listening on the port Cloud Run provides
- Forgetting CORS when frontend and backend are on different domains
- Depending on server memory for persistent sessions
Project references
- AGENTS.md — Cloud Run hosting, env-var rules, minimal API design, non-technical explanation requirement.
- docs/PRD.md — challenge requires Google Cloud usage and backend hosting.
- docs/roadmap.md — MVP infrastructure includes FastAPI on Cloud Run and GCP deployment proof.