docs(maintainers): add note re: STACK_NAME being a snowflake

This commit is contained in:
2025-11-07 10:57:15 +11:00
parent 017cc9b38d
commit 6b6103b00a

View File

@ -323,6 +323,11 @@ Sometimes the containers don't even have Bash installed on them. You had better
When referencing an `app` service in a config file, you should prefix with the `STACK_NAME` to avoid namespace conflicts (because all these containers sit on the traefik overlay network). You might want to do something like this `{{ env "STACK_NAME" }}_app` (using the often obscure dark magic of the Golang templating language). You can find examples of this approach used in the [Peertube recipe](https://git.coopcloud.tech/coop-cloud/peertube/src/commit/d1b297c5a6a23a06bf97bb954104ddfd7f736568/nginx.conf.tmpl#L9).
!!! warning "Here be timing dragons 🐉"
Due to how `STACK_NAME` as an environment variable is initialized within `abra`, it won't be available *early enough* for use within config templates (`*.tmpl`) unless you **use it as an environment variable for one of your compose services**.
Ideally this is addressed in a newer version of `abra`, but for now, this workaround suffices ✅
## How are recipes versioned?
We'll use an example to work through this. Let's use [Gitea](https://hub.docker.com/r/gitea/gitea).