Skip to content

Commit

Permalink
docs: Add Caddyfile env var default value (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie authored Nov 24, 2020
1 parent 44c7994 commit 970aadb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/docs/markdown/caddyfile/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ If your configuration relies on environment variables, you can use them in the C

Environment variables in this form are substituted before parsing begins, so they can expand to empty values, partial tokens, complete tokens, or even multiple tokens and lines.

A default value can be specified for when the environment variable is not found, by using `:` as the delimiter between the variable name and the default value:

```caddy
{$DOMAIN:localhost}
```

If you want to defer the substitution of an environment variable until runtime, you can use the [standard `{env.*}` placeholders](/docs/conventions#placeholders).


Expand Down

0 comments on commit 970aadb

Please sign in to comment.