ConceptsDisks, scaling & suspend
Persistent disks
A disk keeps the files of a service when a deploy replaces its container.
The app writes files in /data. This folder is on the disk.
1 / 3
Each deploy removes the container of a service, and the files in it. To keep files, give the service a disk. A disk is a Docker volume at a path that you choose, the mount path.
Add a disk
ferry create files --repo https://github.com/you/files --disk /data
ferry update api --disk /var/lib/api # add or move the disk (next deploy)
ferry update api --disk "" # stop mounting it (next deploy)The rules
| Subject | Rule |
|---|---|
| Volume | <prefix>-svc-<service id>-disk. Ferry creates it at the first use. |
| What stays | The data stays through deploys, restarts and server restarts. |
| Service types | Web services, private services and background workers. Not static sites, not cron jobs. |
| Mount path | An absolute path, and not /. |
| Instances | Exactly 1. See Deploys with a disk. |
| Size | No limit. The disk uses the Docker storage of the server. |
| Deletion | Ferry deletes the volume with the service. If you remove the disk setting, Ferry only stops the mount. |
Back up disks yourself
Ferry makes no copy and no backup of a disk. See Production setup.
disk: { mountPath: /data } does the same. Ferry accepts name and sizeGB, and ignores them.
Ferry does not limit the size of a disk. The free-disk check only stops new deploys when the Docker storage of the server is almost full. See Resource limits.
A one-off job of the service gets the same disk. See Jobs and the disk.