Skip to content

Project · DevOps: Git, Docker, Kubernetes and CI/CD

Project: a society notice board with Docker Compose

Projectbeginner· about 4 hours· 7 steps

The brief

Green Park Co-operative Housing Society wants its notices (water cuts, maintenance dues, meetings) on a small web API. You keep the code in Git, build a cached, non-root image, describe the API and its Redis database in one compose.yaml with health checks and a volume, prove the data survives a restart, and tag a release whose version reaches the image name.

Why it matters

Most teams run their app and its database locally with Docker Compose, and many small companies run production that way on one VM. Writing a compose file with health checks, depends_on, a volume and secrets kept out of Git is a standard first task for a junior DevOps or backend engineer.

Skills you practise

  • .gitignore and .env files
  • Dockerfile layer caching
  • compose services, ports and environment
  • health checks and depends_on
  • named volumes
  • tags and versioned images

You need

  • Docker Desktop or Docker Engine with the Compose plugin (docker compose version shows v2)
  • Git 2.28 or newer
  • A bash-style terminal: on Windows use Git Bash or WSL

What you will have at the end

A notice-board Git repository with a cached non-root Dockerfile, a compose.yaml with health checks and a persistent Redis volume, .env kept out of Git, and an annotated v1.0.0 release that builds society-api:v1.0.0.

How it is marked (rubric, 100 points)
Working stackAll seven checks pass: healthy services, notices stored and kept across down/up, and a versioned image.40
Good Docker and Compose practicePinned images, cached dependency layer, non-root user, health checks, depends_on with service_healthy, a named volume.25
Secrets and Git hygiene.env is ignored and never committed, .env.example documents the settings, commits are small and well named.20
READMEA short README says how to start, stop and reset the stack, and warns about down -v.15

0/7 steps done

Step 1 of 7

Start the repository without secrets

The repository tracks the app and .env.example, and .gitignore keeps .env out.

Create a folder notice-board with the files from the tabs (app/app.py, app/requirements.txt, .env.example, .gitignore). Copy .env.example to .env: real projects keep passwords and keys in .env, so it must never reach Git. Add .env to .gitignore before your first commit; once a secret is pushed, deleting it later does not remove it from history.

git check-ignore -v tells you which line of which ignore file matched, which is how you debug .gitignore.

Run this on your machine, then paste the output below
$ git ls-files; git check-ignore -v .env
Your notes: app/Dockerfile, compose.yaml, .env.example, .gitignore

Write down each command you ran. It goes into your project summary.