diff --git a/docker/pygeoapi-config.yml b/docker/pygeoapi-config.yml index f5f4c7a..a7e0f7b 100644 --- a/docker/pygeoapi-config.yml +++ b/docker/pygeoapi-config.yml @@ -10,8 +10,8 @@ server: pretty_print: false limit: 500 map: - url: https://tile.openstreetmap.org/{z}/{x}/{y}.png - attribution: '© OpenStreetMap contributors' + url: ${WIS2BOX_BASEMAP_URL} + attribution: ${WIS2BOX_BASEMAP_ATTRIBUTION} templates: path: /pygeoapi/pygeoapi/templates diff --git a/wis2box_api/admin.py b/wis2box_api/admin.py index 0f2d585..b7458a9 100644 --- a/wis2box_api/admin.py +++ b/wis2box_api/admin.py @@ -92,6 +92,11 @@ def write_config(self, config): # validate pygeoapi configuration validate_config(config) + with open(self.PYGEOAPI_CONFIG, encoding='utf8') as fh: + conf = yaml.safe_load(fh) + + config = json_merge_patch.merge(config, conf) + # write pygeoapi configuration LOGGER.debug('Writing pygeoapi configutation') self.yaml_dump(config, self.PYGEOAPI_CONFIG)