Cloud Computing · Guided project
Containerise a Python API and Deploy It to the Cloud — Guided Project
Package a small FastAPI or Flask app with Docker, run it with a database locally using Docker Compose, then deploy the container to a managed container platform with secrets and logs.
- Intermediate
- ~6 hours
- 5 steps
The brief
Build a small API (for example, a placement-question bank with GET and POST endpoints). Write a Dockerfile, run it with PostgreSQL using Docker Compose, then deploy the image to a container platform such as Cloud Run, App Runner or Azure Container Apps. Store the database password in the platform’s secret manager and set up a budget alert before you start.
Skills you will use: Docker · Docker Compose · Container registry · Managed containers · Secrets & cost control
Build it
Step by step
Tick each step as you finish it. 0 of 5 done.
-
Step 1Build the API
Two or three endpoints with a health check at /health.
-
Step 2Dockerise
Write a Dockerfile with cached dependency install and a .dockerignore; run locally.
-
Step 3Compose
Run API + PostgreSQL with docker compose and a named volume.
-
Step 4Deploy
Push the image to a registry and deploy to a managed container service with the secret injected as an environment variable.
-
Step 5Operate
Check logs, set a budget alert, add a simple uptime check and document how to tear everything down.
Self-review before you call it done
Tick each point once your project really meets it. These are the things an interviewer will look for.
Check all 4 points, then mark the project as finished.
Next