Repository navigation
v0.7.0-rc.6
Pre-releaseAdded
Volumes for apps. A volume is a path inside an app's container whose
contents survive deploys and restarts, which is what RabbitMQ,
Elasticsearch and anything else that keeps its state in files needs. Add
one under the app's Settings → Volumes, with cubeship app volume add, or through the API; it is mounted from the app's next deploy.
An app with a volume runs as one copy on one server, where its data
is. Scale above one, spreading and autoscaling are refused while it has
one, and each deploy stops the old container before starting the new
one, so the app is unavailable for a few seconds per deploy. A new
container that will not start is removed and the old one started again.
A new volume is writable by the app. Before its first data, a
volume takes the owner and mode the image has at its path — or the user
the image runs as — so an image that does not run as root can write to
it from its first start.
The data outlives the volume by default. Removing a volume or
deleting its app keeps the data unless you ask for it to be deleted, and
kept data is listed until an admin removes it.
Volumes are backed up and restored from the same Volumes tab: now,
or every day on a schedule, to this machine's disk or an S3 bucket, with
the same retention as a database's backups. The app is stopped while
each copy is taken and started again afterwards. A restore replaces the
volume's contents and cannot be undone; it is unpacked beside the data
first, so one that fails leaves the data as it was. Volumes on a server
other than the control plane cannot be backed up yet.
Volume backups are also in cubeship app volume backup list|take|restore,
in the MCP tools list_volume_backups and back_up_volume, and as rows
of the coverage report under Backups, beside the databases.
Templates can declare volumes: apps[].volumes: [{ path }]. A
template with one needs minCubeship: "0.7.0", so an older instance
refuses it rather than installing it without its data surviving.
Uninstalling keeps the data unless you say otherwise.