Skip to main content

Persistent Storage

You can add persistent storage to your resources to preserve data between deployments.

Docker Engine​

If you are using Docker Engine, persistent storage can be a volume or a bind mount (a file/directory from the host system).

Volume​

To create a volume, you need to define:

  • Name of the volume
  • Destination Path where the volume will be mounted inside the container
Caution

The base directory inside the container is /app. So if you need to store your files under storage directory, define /app/storage as the destination path.

tip

To prevent storage overlapping between resources, the platform automatically adds the resource's UUID to the volume name.

Bind Mount​

To create a bind mount, you need to define:

  • Name of the volume (used as a reference)
  • Source Path from the host system (no Docker volume created)
  • Destination Path where the volume will be mounted inside the container
Caution

Share a file between more than one container? NOT RECOMMENDED.

If you mount the same file to more than one container, you will need to make sure that the proper file locking mechanism is implemented in your resources.