diff --git a/Dockerfile b/Dockerfile index 2f1f4f14..9257ee09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,16 +13,14 @@ WORKDIR /app COPY pyproject.toml uv.lock .python-version ./ COPY src/ src/ -COPY config/ config/ -COPY data/datasets/ data/datasets/ -COPY data/extents.yaml data/extents.yaml RUN uv sync --frozen --no-dev -RUN mkdir -p /tmp/data /app/data/pygeoapi /app/data/artifacts && \ +RUN mkdir -p /app/data/pygeoapi /app/data/artifacts && \ printf '[]\n' > /app/data/artifacts/records.json && \ - chown -R eo:eo /tmp/data /app/data + chown -R eo:eo /app/data +ENV CACHE_OVERRIDE=/app/data ENV PYGEOAPI_CONFIG=/app/data/pygeoapi/pygeoapi-config.yml ENV PYGEOAPI_OPENAPI=/app/data/pygeoapi/pygeoapi-openapi.yml ENV PORT=8000 diff --git a/README.md b/README.md index f8baeb05..9797e950 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,9 @@ else: ## pygeoapi -The OGC API is served by pygeoapi, mounted at `/ogcapi`. Its configuration is generated dynamically from published artifacts and written to `data/pygeoapi/pygeoapi-config.yml`. +The OGC API is served by pygeoapi, mounted at `/ogcapi`. Its configuration is generated dynamically from published artifacts and written to the resolved runtime data directory (for Docker: `/app/data/pygeoapi/pygeoapi-config.yml`). + +The base configuration is bundled with the package at `src/climate_api/data/pygeoapi/base.yml` and does not need to be copied or managed separately. To validate the configuration manually: @@ -116,7 +118,7 @@ To validate the configuration manually: PYTHONPATH="$(pwd)/src" uv run pygeoapi config validate -c data/pygeoapi/pygeoapi-config.yml ``` -Regenerate after changes to `config/pygeoapi/base.yml` or publication logic: +Regenerate after changes to publication logic: ``` make openapi diff --git a/config/pygeoapi/base.yml b/config/pygeoapi/base.yml deleted file mode 100644 index 987290af..00000000 --- a/config/pygeoapi/base.yml +++ /dev/null @@ -1,47 +0,0 @@ -server: - bind: - host: 0.0.0.0 - port: 8000 - url: http://127.0.0.1:8000/ogcapi - mimetype: application/json; charset=UTF-8 - encoding: utf-8 - languages: - - en-US - limits: - default_items: 20 - max_items: 50 - map: - url: https://tile.openstreetmap.org/{z}/{x}/{y}.png - attribution: "© OpenStreetMap contributors" - admin: false - -logging: - level: ERROR - -metadata: - identification: - title: - en: DHIS2 Climate API - description: - en: Published EO gridded data collections - keywords: - en: - - EO - - coverage - - raster - - zarr - - netcdf - terms_of_service: https://dhis2.org - url: https://dhis2.org - provider: - name: DHIS2 Climate API - url: https://dhis2.org - contact: - name: DHIS2 Climate Team - email: climate@dhis2.org - url: https://dhis2.org - license: - name: CC-BY 4.0 - url: https://creativecommons.org/licenses/by/4.0/ - -resources: {}