1600 allow providing default value in config (#1604)

This commit is contained in:
Ricardo Garcia Silva
2024-03-22 21:47:39 +00:00
committed by GitHub
parent 421559a2a6
commit 2abb943d32
3 changed files with 84 additions and 12 deletions
+20
View File
@@ -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
------------------------