csot/contest

Task 08 — Data Ghost Volume

How to evaluate

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

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

The stack has a Postgres service with a named volume declared — yet rows vanish whenever the team runs docker compose down and brings it back up.

Or run the fixture locally, reproduce the data loss, and find the real bug.

What the grader checks (behavioural — any correct fix passes)

  1. docker compose up -d boots and Postgres becomes ready (4 pts)
  2. A row inserted, then docker compose down (no -v), then up again — the row still exists (13 pts)
  3. Postgres's data directory is actually on a persistent volume (5 pts)

Hints

  • Test with docker compose down (NOT down -v — that intentionally wipes volumes and will mislead you).
  • Where does the postgres image actually store its data? Check docker logs and the image docs (PGDATA).
  • The volume is declared; look closely at the mount path.

Points: 22

Other tasks