From 3740a8bcb4fc2e82f47bec73ece8a80be31a667e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 24 Jan 2021 18:23:29 +0100 Subject: [PATCH] docs/conf: add env var substitution docs --- docs/conf/writing.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/conf/writing.md b/docs/conf/writing.md index 05babd66d5..057675c98e 100644 --- a/docs/conf/writing.md +++ b/docs/conf/writing.md @@ -161,3 +161,19 @@ Example `my-secrets.json` file: } } ``` + +## Environment Variable Substitution + +Configuration files support environment variable substitution via a `${MY_VAR}` +syntax. For example: + +```yaml +app: + baseUrl: https://${HOST} +``` + +Note that all environment variables must be available, or the entire +configuration value will evaluate to `undefined`. + +The substitution syntax can be escaped using `$${...}`, which will be resolved +as `${...}`.