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)
docker compose up -dboots and Postgres becomes ready (4 pts)- A row inserted, then
docker compose down(no-v), thenupagain — the row still exists (13 pts) - Postgres's data directory is actually on a persistent volume (5 pts)
Hints
- Test with
docker compose down(NOTdown -v— that intentionally wipes volumes and will mislead you). - Where does the
postgresimage actually store its data? Checkdocker logsand the image docs (PGDATA). - The volume is declared; look closely at the mount path.