csot/contest

Task 05 — Migration Before Ready

How to evaluate

csot challenge start -w week-02 -t 05
# SSH in with printed host, port, password
# cd ~/incident-05 — fix the stack on the VM
csot challenge verify

Edit files under ~/incident-05 on the VM, then docker compose up -d --build.

Fresh deploy fails. "Just restart app" makes it worse. The stack has app, db, and a one-shot migrate job.

What the grader checks

  • Fresh volume: compose up reaches healthy state (5 pts)
  • GET /api/userscount: 0 (3 pts)
  • POST /api/users succeeds (3 pts)
  • After compose down + up (no -v), count persists (4 pts)

Hints

  • depends_on without condition: service_healthy races Postgres startup.
  • The migrate job must finish before the app serves traffic.

Points: 15

Other tasks