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:
Nameof the volumeDestination Pathwhere the volume will be mounted inside the container
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.
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:
Nameof the volume (used as a reference)Source Pathfrom the host system (no Docker volume created)Destination Pathwhere the volume will be mounted inside the container
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.