If your application needs access to multiple files of data or multiple directories, you can use a volume to store the data and then mount the volume at the desired path. You can learn more about Volumes here. To use a persistent volume, we will first need to create one and then attach it to your deployment. You can learn how to create volumes using the Creating a Volume guide.
You can only mount volumes in the same workspace as your service.
Using mounted files in your deployment
Once you have attached a file to your deployment, you can use it in your deployment like any other file. For example, if you mounted the file to/etc/config.json
, you can access the file in the /etc/config.json
path