+
+ + + +

Collection {{ response.title }}

+ +
+ + + +{% include "footer.html" %} From d9e7cae8c58d1405bc9dfc0c4830b3f039de4f45 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Mon, 17 Nov 2025 13:15:57 +0100 Subject: [PATCH 2/2] update docs --- CHANGES.md | 1 + dockerfiles/Dockerfile | 6 ++++++ docs/src/user_guide/endpoints.md | 29 ++++++++++++++++++++++++++++- tipg/extensions/viewer.py | 2 +- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 33d93df..5c441c6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ Note: Minor version `0.X.0` update might break the API, It's recommended to pin * add `FactoryExtension` to `EndpointsFactory` * rename `viewer_endpoint` function to `map_viewer` **breaking change** * rename `/viewer` endpoint to `/map.html` **breaking change** +* changed container image to use non-root `user` ## [1.2.1] - 2025-08-26 diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index c541df2..b727172 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -24,6 +24,11 @@ COPY pyproject.toml pyproject.toml RUN python -m pip install . --no-cache-dir RUN rm -rf tipg/ README.md pyproject.toml LICENSE +RUN groupadd -g 1000 user && \ + useradd -u 1000 -g user -s /bin/bash -m user + +USER user + ################################################### # For compatibility (might be removed at one point) ENV MODULE_NAME=tipg.main @@ -31,4 +36,5 @@ ENV VARIABLE_NAME=app ENV HOST=0.0.0.0 ENV PORT=80 ENV WEB_CONCURRENCY=1 + CMD gunicorn -k uvicorn.workers.UvicornWorker ${MODULE_NAME}:${VARIABLE_NAME} --bind ${HOST}:${PORT} --workers ${WEB_CONCURRENCY} diff --git a/docs/src/user_guide/endpoints.md b/docs/src/user_guide/endpoints.md index b3c6cdd..3db5ba9 100644 --- a/docs/src/user_guide/endpoints.md +++ b/docs/src/user_guide/endpoints.md @@ -1,4 +1,31 @@ +| Method | URL | Output | Description +| ------ | ----------------------------------------------------------------|---------- |-------------- +| `GET` | `/` | JSON/HTML | Landing Page +| `GET` | `/api` | JSON Schema | OpenAPI JSON Schema +| `GET` | `/api.html` | HTML | Swagger page +| `GET` | `/conformance` | JSON/HTML | Conformance classes supported +| - | - | - |- +| `GET` | `/collections` | JSON/HTML | List of Collections available +| `GET` | `/collections/{collectionId}` | JSON/HTML | Collection's metadata +| `GET` | `/collection/{collectionId}/queryables` | JSON/HTML | List of Collection's queryables +| `GET` | `/collections/{collectionId}/items` | GeoJSON/HTML | Collection's Items +| `GET` | `/collections/{collectionId}/items/{itemId}` | GeoJSON/HTML | Item's metadata +| - | - | - |- +| `GET` | `/tileMatrixSets` | JSON/HTML | List of TileMatrixSets available +| `GET` | `/tileMatrixSets/{tileMatrixSetId}` | JSON/HTML | TileMatrixSet's metadata +| `GET` | `/collections/{collectionId}/tiles` | JSON/HTML | List of OGC Tilesets available +| `GET` | `/collections/{collectionId}/tiles/{tileMatrixSetId}` | JSON/HTML| OGC Tileset metadata +| `GET` | `/collections/{collectionId}/tiles/{tileMatrixSetId}/{z}/{x}/{y}`| bin | Vector Tile +| - | - | - |- +| `GET` | `/collections/{collectionId}/tiles/{tileMatrixSetId}/tilejson.json` | TileJSON | Mapbox TileJSON document +| `GET` | `/collections/{collectionId}/tiles/{tileMatrixSetId}/style.json` | StyleJSON | Mapbox StyleJSON document +| `GET` | `/collections/{collectionId}/{tileMatrixSetId}/map.html` | HTML | Simple map viewer (leaflet) +| `GET` | `/collections/{collectionId}/viewer.html` | HTML | WebMercator viewer (maplibre) +| - | - | - |- +| `GET` | `/healthz.html` | JSON | Health check + + ## OGC Common ### Landing page @@ -100,7 +127,7 @@ curl http://127.0.0.1:8081 | jq "title": "Collection TileSet (Template URL)" }, { - "href": "http://127.0.0.1:8081/collections/{collectionId}/tiles/{tileMatrixSetId}/viewer", + "href": "http://127.0.0.1:8081/collections/{collectionId}/tiles/{tileMatrixSetId}/map.html", "rel": "data", "type": "text/html", "templated": true, diff --git a/tipg/extensions/viewer.py b/tipg/extensions/viewer.py index 77cc9fd..9f37c59 100644 --- a/tipg/extensions/viewer.py +++ b/tipg/extensions/viewer.py @@ -15,7 +15,7 @@ @dataclass class viewerExtension(FactoryExtension): - """Add /validate endpoint to a COG TilerFactory.""" + """Add /viewer endpoint.""" def register(self, factory: EndpointsFactory): """Register endpoint to the tiler factory."""