Skip to content
Snippets Groups Projects
David Hoese's avatar
cec0d95f
History

geosphere-api

API web service used by the GeoSphere web application.

This repository holds the python package that contains the web service, the Dockerfile definition for building a docker image for the python package, and a helm chart definition to deploy the web service to a Kubernetes cluster.

Serve development

pip install uvicorn[standard] pip install -e .

uvicorn geosphere_api.main:app --reload

Server Production

uvicorn geosphere_api.main:app --workers 4 --host "0.0.0.0" --port "80"

Customize YAML configuration

See geosphere_api/default_settings.yaml for format.

When run from docker, mount file in container and point environment variables to the mounted location.

docker run -d --rm --name geosphere-api -p 8080:80 -v /tmp/my_settings.yaml:/data/my_settings.yaml -e GEOSPHERE_API_YAML_SETTINGS=/data/my_settings.yaml geosphere-api:latest