Volumes
Block storage mounted into an app target — sized, node-local or replicated, with snapshots
environments:
prod:
volumes:
- name: data
storage_gb: 5
durability: ha # standard (default) or ha; immutable after creation
apps:
- name: api
targets:
- name: primary
volumes:
- volume: data
mount_path: /var/lib/apppier ls volumes
NAME SIZE DURABILITY STATUS HEALTH BOUND TO
data 1 GB standard ready - app/api at /var/lib/app (pending)
A volume is a disk. It is declared once in the environment and mounted into one app target at a path; the data survives deploys, restarts and scale changes of that target.
Configuration
| Key | Meaning |
|---|---|
storage_gb | Size; can grow, never shrink |
durability | standard — node-local, fastest, default; ha — replicated, survives a node failure. Set at creation |
targets[].volumes[] (on the app) | volume and mount_path |
Commands
| Command | Does |
|---|---|
pier add volume --name data --size 5GB --app api --mount /var/lib/app, pier set volume data --size 10GB, pier rm volume data | declare, grow, remove |
pier snapshots ls data, pier snapshots create data | snapshots |
pier info data, pier monitor data | binding, health, usage |
Behaviour
- A volume mounts into one target at a time; an app with
replicas: 2cannot share it. - Adding or moving a binding rolls the target with its current image; no build runs.
havolumes keep serving through a node failure.standardvolumes are tied to the node that holds them; they suit caches and data that can be rebuilt.- A removed volume stays in trash for 30 days with its data.