Capstone project

Capstone: a recoverable application stack

Lesson 20 of 20 · 28 min · Module 6: Operate a complete stack

Describe a stack that has deliberate access, persistent data, and a useful startup contract.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Review the whole stack contract
  • Check failure and replacement assumptions

The idea

Compose describes services and their relationships as YAML mappings and sequences. Read the whole service graph, including access and storage boundaries.

01Review the whole stack contract

Access, discovery, storage, startup dependencies, and restart behavior should agree. A change in one area can undermine another even when each line is syntactically valid.

02Check failure and replacement assumptions

A volume preserves data through container replacement; a health condition gates startup; a restart policy reacts to exits. None alone guarantees end-to-end reliability.

03Write the next operational test

After configuration review, a real team would build the image, start the stack, make a request, replace a container, and test restoration. The lab provides configuration evidence, not those real executions.

Your project brief

Define api with notes:1.0, localhost 8080:3000, NODE_ENV=production, REDIS_HOST=cache, restart on-failure, and notes-data:/data. Define cache with redis:7-alpine and healthcheck ["CMD","redis-cli","ping"]. API must wait for cache service_healthy. Put both on declared app-net; publish no cache ports. Declare notes-data.

What the checks look for

  • Correct API release and local entry point
  • Uses production configuration and restart behavior
  • Keeps persistent application data
  • Waits for a checked cache
  • Shares the declared network without publishing cache
Try it in the editor →

Take this with you

Ship a clear, testable operating contract with your application.

Go a little further

Write a short operator checklist for startup, replacement, and restoring the notes volume.

Learn Docker & Containers for free

20 short lessons with real code and instant checks.

See the whole course →