It is important to keep in mind, that once you stop or restart a sloppy.io application, all data written to the file system in the Docker container representing this application will be lost.

However, you can preserve your data to survive stops and restarts of your app by using volumes. Each volume you define will be created when the application is created; and will be available until it is eventually deleted.

To create a backup of your volume, you can use our snapshot feature.

Usage

You can configure your sloppy.json or sloppy.ymlto export the files of your application, using the volumes key. It expects an array of the following objects as value:

container_path  This is the path, in which the volume will be mounted. If specified, this will be used as mounting point of the volume from the referenced application. If not specified, the mounting point will be equal to the mounting point of the referenced application. 

size  This is the volume size in GB. (8, 16, 24 or 32GB) 

Setting up a volume

In the following example we are using the volumes key to set up a volume with 8 gigabytes to store the data of a container running a MySQL database:

.

{(...)
{
  "id": "backend",
  "apps": [
    {
      "id": "mysql",
      (...)
      "volumes": [
        {
          "container_path": "/var/lib/mysql",
          "size": "8GB"
        }
      ],
      (...)
    }
  ]
}
(...)}

Removing a volume

You can not remove attached volumes. Volumes are removed by deleting the project.

Current limitations

  • no shared volumes (volumes_from in docker-compose)
  • no volume sizes smaller then 8GB
Did this answer your question?