Skip to content

dev: explicit data wipe via mirrorstack dev down --volumes #26

Description

@I-am-nothing

Goal

Currently `Ctrl-C` runs `docker compose down` which keeps the named volume — Postgres data persists across `mirrorstack dev` restarts. That's the right default, but devs sometimes need a clean slate.

Add an explicit subcommand:

```
mirrorstack dev down # same as Ctrl-C teardown (data preserved)
mirrorstack dev down --volumes # wipes pg data + named volumes
```

Sketch

  • Promote `down` to a sub-subcommand (could be top-level `down` if we keep `dev` flat, but the data is dev-specific so namespacing under `dev` is clearer)
  • Pass-through to `docker compose down` / `docker compose down -v`
  • No-op friendly: if there's no `docker-compose.yml` in cwd, print a hint and exit 0

Acceptance

  • `mirrorstack dev down` removes containers + network, keeps volumes
  • `mirrorstack dev down --volumes` wipes everything; subsequent `mirrorstack dev` boots a fresh pg
  • Clear error when run outside a module dir

Estimate

~30 LoC + 1 test (mock the docker call or skip in CI). ~20 minutes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions