Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable statistics endpoint for mosaics
Browse files Browse the repository at this point in the history
Also enable hot reload for local runtimes and fix broken pygeoif dependency.
ividito committed Oct 19, 2022
1 parent 572f14a commit 137a12d
Showing 5 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -35,9 +35,11 @@ services:
depends_on:
- database
- raster
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 45 -h database -p 5432 && /start.sh"
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 45 -h database -p 5432 && /start-reload.sh"
volumes:
- ./scripts:/tmp/scripts
- ./stac_api/runtime/src:/app/src


raster:
container_name: delta.raster
@@ -87,11 +89,13 @@ services:

depends_on:
- database
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 25 -h database -p 5432 && /start.sh"
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 25 -h database -p 5432 && /start-reload.sh"
volumes:
- ./scripts:/tmp/scripts
- ./raster_api/runtime/src:/app/src
- $HOME/.aws/credentials:/root/.aws/credentials


database:
container_name: delta.db
platform: linux/amd64
2 changes: 1 addition & 1 deletion local/Dockerfile.raster
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.8

FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION}

2 changes: 1 addition & 1 deletion local/Dockerfile.stac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.8

FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION}

2 changes: 1 addition & 1 deletion raster_api/runtime/src/app.py
Original file line number Diff line number Diff line change
@@ -40,14 +40,14 @@
add_exception_handlers(app, DEFAULT_STATUS_CODES)
add_exception_handlers(app, MOSAIC_STATUS_CODES)


# Custom PgSTAC mosaic tiler
mosaic = MosaicTilerFactory(
router_prefix="/mosaic",
enable_mosaic_search=settings.enable_mosaic_search,
optional_headers=optional_headers,
gdal_config=settings.get_gdal_config(),
dataset_dependency=DatasetParams,
add_statistics=True,
)
app.include_router(mosaic.router, prefix="/mosaic", tags=["Mosaic"])

1 change: 1 addition & 0 deletions stac_api/runtime/setup.py
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
"jinja2>=2.11.2,<4.0.0",
"starlette-cramjam>=0.1.0.a0,<0.2",
"importlib_resources>=1.1.0;python_version<'3.9'",
"pygeoif<=0.8", # newest release (1.0+ / 09-22-2022) breaks a number of other geo libs
]

extra_reqs = {

0 comments on commit 137a12d

Please sign in to comment.