← Dev log
EduQate·infrastructure·2026-08-10

A dev entrypoint that kept resurrecting deleted data

A Docker dev entrypoint re-ran the seed script on every container start, reinserting deleted rows and crash-looping on a duplicate key.

Two copies drifted

One idea kept by hand in two places — schema and migration, dev and prod, app and app.

devops/docker/entrypoints/backend-dev.sh auto-ran seed-content.js on every container start, reinserting 15 obsolete demo organisations on top of the real 48-organisation dataset every restart. It caused two confusing moments in one session: a dashboard suddenly reading "63/63 organisations", then a crash loop when a partial re-seed hit a duplicate key.

From the same period: the prod Postgres volume is external now so docker compose down -v can't take it, and every local and CI container carries an app-dev- prefix so a local stack can't address the real one. Both are cheap, and both exist because something nearly went badly.