Document environment variables

This commit is contained in:
Cadence Ember 2022-09-17 23:11:41 +12:00
parent 4eed706dda
commit 4dff3bb00a
Signed by: cadence
GPG Key ID: BC1C2C61CF521B17
1 changed files with 24 additions and 10 deletions

View File

@ -163,7 +163,7 @@ If you do not specify a specific option, the internal default will be used. If t
If you're using a compiled distribution of BreezeWiki, the main @code{config.ini} file will actually be a symlink to the real location of the file. Make sure not to erase the symlink, or your settings will be ignored!
@subsection{Example}
@subsubsection{Example}
Here is an example configuration file. It shows all the available settings and all their defaults.
@verbatim{
@ -172,15 +172,7 @@ debug = false
port = 10416
}
@subsection[#:tag "Required options"]{Required options}
No options are strictly required, but some are highly recommended, depending on where you're running BreezeWiki.
When running for local development, @code{debug = true} is recommended.
When running in production, @code{canonical_origin} is highly recommended.
@subsection{Format}
@subsubsection{Format}
@itemlist[
@item{A line with an equals sign @code{=} defines one setting.}
@ -191,6 +183,28 @@ When running in production, @code{canonical_origin} is highly recommended.
@item{@italic{False} values are represented by either empty space, or the text @code{false}. Anything else is @italic{True}.}
]
@subsection{Environment variables}
By popular demand, environment variables can be used as an alternative to the configuration file. The configuration file will be read first and will override the default settings, then, if any environment variables are present, they will override the values in the configuration files.
Environment variables start with @code{bw_} and then the name of the setting. They can be uppercase or lowercase.
@subsubsection{Example}
Here is an example of using environment variables in a typical shell:
@verbatim{
bw_port=4000 bw_debug=false racket dist.rkt
}
@subsection[#:tag "Required options"]{Required options}
No options are strictly required, but some are highly recommended, depending on where you're running BreezeWiki.
When running for local development, @code{debug = true} is recommended.
When running in production, @code{canonical_origin} is highly recommended.
@subsection{Detailed Options}
@defthing[canonical_origin value #:value ""]{