make setup-rebuild
Tear down and rebuild the environment from scratch.
Destructive — asks for confirmation first. This target deletes volumes and prunes images. It will not proceed until you type
y, and it refuses to run unattended (no TTY) unless forced.
Usage
make setup-rebuild
You will be prompted before anything is touched:
⚠️ setup-rebuild is DESTRUCTIVE:
• docker compose down -v → deletes this stack's volumes
• docker image prune -a -f → deletes ALL unused images on this machine
(not just SPLENT — affects other projects)
Continue? [y/N]
Anything other than y / yes aborts with no changes made. The confirmation
runs before every other step, so a No leaves your environment exactly as it
was.
Skipping the prompt (CI / automation)
make setup-rebuild FORCE=1
FORCE=1 (or running under CI=1) bypasses the prompt. Without a TTY and without
FORCE, the target refuses to run rather than guess.
What it does
env-prepare— ensure../.envexists and is correct.- Host pre-flight.
docker compose down -v --remove-orphans— stop containers and drop volumes.docker image prune -a -f— remove old images.docker compose build --no-cache— rebuild images from scratch.docker compose up -d --build— start fresh containers.cli-enter— enter the CLI shell.
When to use
- The Docker image is stale.
- After major dependency or
Dockerfilechanges. - When a normal
make setupstarts from a broken image.
This deletes volumes (-v) and all unused images (prune -a). Any data
living only in a container volume will be lost.
Related
make setup— the non-destructive setup.