1600 allow providing default value in config (#1604)
This commit is contained in:
committed by
GitHub
parent
421559a2a6
commit
2abb943d32
@@ -412,6 +412,26 @@ Below is an example of how to integrate system environment variables in pygeoapi
|
||||
host: ${MY_HOST}
|
||||
port: ${MY_PORT}
|
||||
|
||||
Multiple environment variables are supported as follows:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
data: ${MY_HOST}:${MY_PORT}
|
||||
|
||||
It is also possible to define a default value for a variable in case it does not exist in
|
||||
the environment using a syntax like: ``value: ${ENV_VAR:-the default}``
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
server:
|
||||
bind:
|
||||
host: ${MY_HOST:-localhost}
|
||||
port: ${MY_PORT:-5000}
|
||||
metadata:
|
||||
identification:
|
||||
title:
|
||||
en: This is pygeoapi host ${MY_HOST} and port ${MY_PORT:-5000}, nice to meet you!
|
||||
|
||||
|
||||
Hierarchical collections
|
||||
------------------------
|
||||
|
||||
Reference in New Issue
Block a user