Skip to content

Commit

Permalink
Merge pull request #72 from UNDP-Data/feat/cmap-endpoint
Browse files Browse the repository at this point in the history
add colormap endpoint
  • Loading branch information
iferencik authored Mar 25, 2024
2 parents 466375a + 01231e7 commit 01ad3e4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 376 deletions.
15 changes: 5 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@ services:
# See https://github.com/developmentseed/titiler/discussions/387
#platform: linux/amd64
# enable `image` if you would like to use Docker image from Github package
image: ghcr.io/undp-data/cogserver:latest
#image: ghcr.io/undp-data/cogserver:latest
# enable `build` if you would like to build Docker image from source code
# image: undpgeohub.azurecr.io/cogserver-debug
build:
context: .


container_name: cogserver
# Enable the following volumes if you want to mount source code to Docker
volumes:
- "./src/cogserver:/opt/server/cogserver"
# env_file:
# - gdal_rio.env
env_file:
- ./gdal_rio.env
# the above env file contains the $PORT variable.
ports:
- "8000:8000"
environment:
# # Application
- HOST=0.0.0.0
- PORT=8000
- "${PORT}:${PORT}"



6 changes: 0 additions & 6 deletions src/app.py

This file was deleted.

39 changes: 0 additions & 39 deletions src/cogserver/logconf.yaml

This file was deleted.

14 changes: 13 additions & 1 deletion src/cogserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rio_tiler.io import STACReader
import logging
from fastapi import FastAPI
from titiler.core.factory import TilerFactory, MultiBaseTilerFactory, AlgorithmFactory
from titiler.core.factory import TilerFactory, MultiBaseTilerFactory, AlgorithmFactory, ColorMapFactory
from titiler.application import __version__ as titiler_version
from cogserver.landing import setup_landing
from starlette.middleware.cors import CORSMiddleware
Expand Down Expand Up @@ -132,6 +132,18 @@

###############################################################################


############################# ColorMap ##################################
# Colormaps endpoints
cmaps = ColorMapFactory()
app.include_router(
cmaps.router,
tags=["ColorMaps"],
)

###############################################################################


@app.get("/health", description="Health Check", tags=["Health Check"])
def ping():
"""Health check."""
Expand Down
14 changes: 0 additions & 14 deletions src/cogserver/t.py

This file was deleted.

Loading

0 comments on commit 01ad3e4

Please sign in to comment.