Red Thread Project: containerized API + database delivered with CI

Red Thread Project — Containerized API + database delivered with CI

⬇️ Download the sample compose (YML) ⬇️ Download the sample Dockerfile ⬇️ Docker cheat sheet (TXT)

Step 0 · Level 0 — Environment ready

Install Docker, validate hello-world, create the projet/mon-app folder with api/, compose.yml and .github/workflows. The run/ps/stop/rm routine must feel fluent.

Step 1 · Level 1 — Wired Hub services

Run postgres:16.4 with the pgdata volume on the monapp network (without publishing the database). Run adminer in the dev profile. Prove rm + relaunch without loss and name-based resolution.

Step 2 · Level 2 — Hardened home-built image

Write the api Dockerfile (slim, dependencies first, USER node, .dockerignore), build mon-app:1.0, scan it, fix until zero critical.

Step 3 · Level 3 — Full Compose stack

Assemble api (build) + db (volume) + adminer (dev profile) with DATABASE_URL as a variable, simple depends_on then app-level retry. Validate config, up --build, down/up without loss.

Step 4 · Level 4 — Reliable and shipped with CI

Add restart + db healthcheck + healthy condition, proxy published alone, tested dump backup + snapshot, CI workflow building + pushing the SHA to GHCR.

Step 5 · Level 5 — Ready for what's next

Audit with checklist 5.4 (8 yeses), test Swarm on a single node (3 replicas), deploy the minimal K8s setup on kind. Plan the DCA.

Success criteria