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

  1. env-prepare — ensure ../.env exists and is correct.
  2. Host pre-flight.
  3. docker compose down -v --remove-orphans — stop containers and drop volumes.
  4. docker image prune -a -f — remove old images.
  5. docker compose build --no-cache — rebuild images from scratch.
  6. docker compose up -d --build — start fresh containers.
  7. cli-enter — enter the CLI shell.

When to use

  • The Docker image is stale.
  • After major dependency or Dockerfile changes.
  • When a normal make setup starts 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.


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es