In some applications, you might need a file to be present at a certain path for the application to work. Or you have data in directories that need to be mounted for the application to work. You can mount data to your service either by mounting a volume, secret or a string.
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.
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.
This can be useful if you need a small configuration file to be present at a certain file path. To configure this, you need to provide the path where it needs to be mounted and the string data that should be in that file. A good example can be a Nginx configuration file that you can mount along with the Nginx docker image.
This is similar to string mount, except, in this case, you will directly provide a TrueFoundry Secret FQN. You can read more about Secrets and how to create them here.
The content in the secret will be dumped into a file and mounted in the provided location. A good usecase of this is for mounting Google credentials file which you might need to access Google services.
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
In some applications, you might need a file to be present at a certain path for the application to work. Or you have data in directories that need to be mounted for the application to work. You can mount data to your service either by mounting a volume, secret or a string.
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.
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.
This can be useful if you need a small configuration file to be present at a certain file path. To configure this, you need to provide the path where it needs to be mounted and the string data that should be in that file. A good example can be a Nginx configuration file that you can mount along with the Nginx docker image.
This is similar to string mount, except, in this case, you will directly provide a TrueFoundry Secret FQN. You can read more about Secrets and how to create them here.
The content in the secret will be dumped into a file and mounted in the provided location. A good usecase of this is for mounting Google credentials file which you might need to access Google services.
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