question
How to mount a file in a container via stack files
I'm using a stack file (cycle.json) in my repo and I have a container for grafana which needs a config file mounted in the container. I know I can update this file in the portal but is there a way to define the file in the stack file so I can just update it in code?
Hey Sami, great question.
The best way to do this IMO is using the scoped variable file type, but there are two implementation choices.
- You define the scoped variable and the config file in the stack. You can use stack variables to abstract the values out of the repo itself. If you do this you'll want the "blob" type to preserve formatting.
- You define a scoped variable file type in the environment and then set the "container identifiers" to the identifier for that container.