Every setting can be given as an environment variable (closes #128) #131
@@ -128,10 +128,13 @@ For the same image at quality 40 with fit `contain`, the input ends in
|
|||||||
Every setting can be given as an environment variable, in a YAML config
|
Every setting can be given as an environment variable, in a YAML config
|
||||||
file (`--config`), or both. A variable present in the environment wins over
|
file (`--config`), or both. A variable present in the environment wins over
|
||||||
the file, even when it is empty, and the file wins over the built-in
|
the file, even when it is empty, and the file wins over the built-in
|
||||||
default. A variable's value is parsed as the same text in the file would
|
default. The one exception is a variable named in the file's `env:` section:
|
||||||
be. The three lists take comma-separated entries, with the spaces around
|
it is set while the file loads, so it overrides both the environment the
|
||||||
each trimmed; an empty variable is an empty list. A value that does not
|
process was started with and the file's own key. A variable's value is
|
||||||
parse or is invalid aborts startup, naming the variable.
|
parsed as the same text in the file would be. The three lists take
|
||||||
|
comma-separated entries, with the spaces around each trimmed; an empty
|
||||||
|
variable is an empty list. A value that does not parse or is invalid aborts
|
||||||
|
startup, naming the variable.
|
||||||
|
|
||||||
| Variable | Config key | Meaning |
|
| Variable | Config key | Meaning |
|
||||||
| ------------------------------------ | ------------------------------- | ---------------------------------------------------------------------------- |
|
| ------------------------------------ | ------------------------------- | ---------------------------------------------------------------------------- |
|
||||||
|
|||||||
+4
-1
@@ -4,7 +4,10 @@
|
|||||||
# this file: PIXA_ plus the key in upper case, with "." written as "_"
|
# this file: PIXA_ plus the key in upper case, with "." written as "_"
|
||||||
# (state_dir is PIXA_STATE_DIR, metrics.username is
|
# (state_dir is PIXA_STATE_DIR, metrics.username is
|
||||||
# PIXA_METRICS_USERNAME). The one exception is port, which is set by
|
# PIXA_METRICS_USERNAME). The one exception is port, which is set by
|
||||||
# PORT. In a variable, a list is comma-separated.
|
# PORT. In a variable, a list is comma-separated. A variable named in
|
||||||
|
# this file's env: section is set while the file loads, so it overrides
|
||||||
|
# both the environment the process was started with and this file's own
|
||||||
|
# key.
|
||||||
|
|
||||||
# Server settings
|
# Server settings
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|||||||
Reference in New Issue
Block a user