Skip to content

chore(docker): name test DB volumes to stop anonymous volume buildup - #131

Merged
robertazzopardi merged 1 commit into
mainfrom
chore/named-test-volumes
Nov 15, 2026
Merged

robertazzopardi merged 1 commit into
mainfrom
chore/named-test-volumes

Conversation

@robertazzopardi

Copy link
Copy Markdown
Owner

Every docker compose down/up of the d7s test DBs left an orphaned anonymous volume (~80-200MB each), slowly filling disk.

  • crates/d7s/docker-compose.yml: named volumes for postgres, mysql, mariadb and the TLS-profile services (postgres-tls, mariadb-tls, mariadb-plain). Postgres mounts /var/lib/postgresql (postgres:18 data path).
  • crates/c8s/demo/docker-compose.yml: name redis's implicit /data volume.
  • justfile: new just docker-reset (--profile tls down -v) to wipe and re-seed; c8s-demo-teardown now uses down -v.

Behaviour change: data now persists across down/up, so seed scripts only run on first init. After editing a seed file, run just docker-reset.

Existing anonymous volumes aren't removed; docker volume prune cleans them (check the list first, it hits other projects too).

Postgres, MySQL, MariaDB (incl. TLS profile) and the c8s demo redis now use
named volumes, so down/up reuses them instead of orphaning anonymous ones.
Add `just docker-reset` (down -v) to wipe and re-seed; c8s demo teardown
now removes its volume.
@robertazzopardi
robertazzopardi merged commit 0d9f5d2 into main Nov 15, 2026
7 checks passed
@robertazzopardi
robertazzopardi deleted the chore/named-test-volumes branch November 15, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant