pier_

Volumes

Block storage mounted into an app target — sized, node-local or replicated, with snapshots

pier.yaml
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/app
pier ls volumes
output
                                                                      
 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

KeyMeaning
storage_gbSize; can grow, never shrink
durabilitystandard — node-local, fastest, default; ha — replicated, survives a node failure. Set at creation
targets[].volumes[] (on the app)volume and mount_path

Commands

CommandDoes
pier add volume --name data --size 5GB --app api --mount /var/lib/app, pier set volume data --size 10GB, pier rm volume datadeclare, grow, remove
pier snapshots ls data, pier snapshots create datasnapshots
pier info data, pier monitor databinding, health, usage

Behaviour

  • A volume mounts into one target at a time; an app with replicas: 2 cannot share it.
  • Adding or moving a binding rolls the target with its current image; no build runs.
  • ha volumes keep serving through a node failure. standard volumes 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.

Tasks

Deploy an app

On this page