Config templates don't have access to STACK_NAME unless it's used as an env var in the compose file #725
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
See the relevant docs PR to keep track of this till it's resolved: toolshed/docs.coopcloud.tech#291
This came out of a rabbit hole deep dive where @3wordchant theorized it's very likely that
STACK_NAMEisn't available for use early enough in.tmplfiles via Docker configs.Unless, we add it as an environment variable to any of the Docker compose services, then it's available (that's what the docs mention as a workaround for now)
Ideally, Abra should handle this anyway & ensure that
STACK_NAMEis initialized early enough for config templates to work 🙏@pharaohgraphy ah, my apologies, I understand the issue now better. Thanks for raising.
There is nothing much we can do this about, I believe. In order to have docker bring env vars into the template files, you must specify them in the
env: ...stanza (like everything else). I don't believe these can be inserted at runtime "under the hood" because we don't have access to the template engine step.I agree this is a bit of a footgun. I'll work on the docs patch now. I think we can have a section on "special env vars".
f0120151d8