Volume Management

Volumes persist block data across stack restarts, so stateful services like PostgreSQL retain their databases between stackie down and stackie up.

Storage Layout

All sandbox storage lives under ~/.stackie/storage/ by default:

~/.stackie/storage/
├── volumes/{project}/{path_name}/   ← persistent block data (survives restarts)
├── paths/{sandbox_id}/              ← per-sandbox filesystem root
├── logs/{sandbox_id}/               ← stdout.log + stderr.log
└── tmp/{sandbox_id}/                ← mapped to /tmp inside sandbox

Declaring Volumes

# stackie-stack.yml
blocks:
  postgres:
    volumes:
      - pgdata:/var/lib/postgresql/data

Named volumes are shared within a project. Two blocks referencing pgdata in the same stack will see the same directory on the host.

Ephemeral Stacks

Pass --ephemeral to use temporary storage that is automatically cleaned up when the stack stops:

stackie up --ephemeral

Ephemeral storage lives under $TMPDIR/stackie/ instead of the persistent ~/.stackie/storage/ tree.