LearnFrenzy
Sign in Take a free test

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.

  1. Step 1Build the API

    Two or three endpoints with a health check at /health.

  2. Step 2Dockerise

    Write a Dockerfile with cached dependency install and a .dockerignore; run locally.

  3. Step 3Compose

    Run API + PostgreSQL with docker compose and a named volume.

  4. Step 4Deploy

    Push the image to a registry and deploy to a managed container service with the secret injected as an environment variable.

  5. 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.

0 / 4 checked

Check all 4 points, then mark the project as finished.

Next

More guided projects

Search LearnFrenzy

Esc

Quick links