You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I have a nomad job running a docker container where some of the environment variables are generated using a nomad template. This is very useful to generate some of the environment variables from consul keys.
Currently, I'm overriding the run command with a sh -c command running a oneliner script. This works for this particular use case but it won't work for every docker image.
What would be nice is to have a possibility to define a list of files containing environment variables that would be read before running the task.
Great minds think alike! #2654 is almost ready and adds almost exactly the behavior you're asking for. The one difference is that instead of the environment_files=[...] key there's an env=true flag on each template you want to read in as an environment variable.
It will be in master soon and released in 0.6.
Closing this as a dupe of #1765 as that's the original inspiration for this feature.
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Currently, I have a nomad job running a docker container where some of the environment variables are generated using a nomad template. This is very useful to generate some of the environment variables from consul keys.
Currently, I'm overriding the run command with a
sh -c
command running a oneliner script. This works for this particular use case but it won't work for every docker image.What would be nice is to have a possibility to define a list of files containing environment variables that would be read before running the task.
My current job looks like:
I'd prefer something like:
The text was updated successfully, but these errors were encountered: