From 48489718b67881a6261e2d238cd99a6a86d4ef8b Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 30 Aug 2025 12:49:53 +0200 Subject: [PATCH] docs: templating See https://git.coopcloud.tech/toolshed/organising/issues/521 --- docs/maintainers/handbook.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/maintainers/handbook.md b/docs/maintainers/handbook.md index 7d51f3e..c0b0ed1 100644 --- a/docs/maintainers/handbook.md +++ b/docs/maintainers/handbook.md @@ -256,6 +256,20 @@ file_env "DB_PASSWORD" Sometimes the containers don't even have Bash installed on them. You had better just use `/bin/sh` or, in your entrypoint script, install Bash :upside_down: The entrypoint secrets hack listed above doesn't work in this case (as it requires Bash), so instead you can just do `export FOO=$(cat /run/secrets/)`. +## Templating + +### Templating domain names in the `.env.sample` + +`.example.com` will be transformed into the end-user app domain when `abra app new` is run. + +### Templating domain names in release notes + +!!! warning "Watch out for old versions of `abra` 🚧" + + This feature is only available in the >= 0.11.x series of `abra`. + +`.example.com` will be transformed into the end-user app domain when `abra app upgrade` shows release notes. + ## How do I reference services in configs? 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).