volumes: block declares persistent volumes your services can mount, Compose-style. A volume survives redeploys, and slipway seeds every new preview from the volume’s latest snapshot — so reviewers get realistic, isolated data instead of an empty database.
Declaring volumes
| Where | Syntax |
|---|---|
| Top level | volumes: → pgdata: — each key declares a named volume. Capacity is set by your plan, not here. |
| In a service | volumes: → - pgdata:/path — references a declared volume; the path must be absolute. |
Sizing and the storage budget
Volume capacity is set by your plan, not inslipway.yaml — every volume is provisioned at your plan’s default size. A size: key in the spec is ignored (the deploy logs a warning if it finds one); this keeps a single repo from reserving a huge slice of shared storage.
Your plan includes a total storage budget across every named volume, and slipway bills on the storage you actually use — the bytes written, not the volume’s reserved size — so a half-empty volume only counts for what’s in it. Watch usage in the sidebar’s Usage panel and on Settings → Billing.
The budget only counts volumes on slipway’s own cluster. Volumes on a cluster you bring yourself live on your storage and don’t count.
How seeding works
There’s no separate “base” database to manage — the snapshot history is the durable lineage:- First deploy — the volume comes up empty.
- Load data — run your app and add data, or load a dump.
- Take a snapshot — from the deployment page or
sw snapshot. - Every preview after that — gets its own isolated copy, pre-seeded from the latest snapshot. A destructive migration in one PR never touches another.
Snapshots
Each volume keeps a numbered history, newest first. Manage them from a deployment page (Snapshot now + the history table) or the CLI:sw restore reverts a deployment’s live volume to an earlier snapshot. It takes a safety snapshot of the current state first, so the revert is itself undoable. Retention follows your plan (default 10 per volume) — the oldest are pruned past the cap, and the latest is never pruned.
Any engine works
Seeding is a raw block-level copy, so slipway doesn’t need to understand the engine — Postgres, MySQL, Mongo, SQLite-on-disk, a Lucene index, or a plain uploads folder all snapshot and restore identically. Mount the volume wherever the image writes.Limitations
- Snapshots need snapshot-capable storage. On a cluster without it (e.g. local
k3d), volumes still work but Snapshot now degrades gracefully with a clear message. - One replica. A volume-mounted service runs at a single replica.
- Per-repo lineage. Snapshot history belongs to a
(repo, volume)pair; cross-repo snapshot sharing isn’t available. - No anonymisation tooling. Sanitise data on the way in, not after.