Closed tomkralidis closed 4 years ago
Should not be too hard, basically an adapted copy of service/pygeoapi_master into service/pygeoapi_cite
plus some service/deploy support scripts:
[ ] https://github.com/geopython/demo.pygeoapi.io/blob/master/services/start.sh
[ ] https://github.com/geopython/demo.pygeoapi.io/blob/master/services/stop.sh
[ ] adapt DockerHub trigger script
[ ] The Cite docker-compose
file should have an ES container added with some init script to load data, basically a variant of the pygeoapi Docker ES example, including the wait-for-ES
for pygeoapi ES Provider
(or will it autoconnect?).
NB we will need an extended ES Docker Image that includes .sh
scripts+data as the DockerHub trigger script would not allow Docker Volume mapping.
Good start! Think biggest challenge is to get the pygeoapi
and ES
Docker Containers initialized and interacting:
ES (down)loading data
pygeoapi
: does it have to wait until ES
Container is ready? We have something similar with GHC to PostGIS, solved with timed loop.
Though I think the Provider should be handling (re)connects to ES...
Some hints on services/pygeoapi_cite:
Dockerfile
: last line (data copy) can be removed (data is loaded in ES Container).
Dockerfile
: line 8: COPY ./cite.config.yml /pygeoapi/local.config.yml
(as pygeoapi
Docker Image expects config in /pygeoapi/local.config.yml
no need for OpenAPI docgen (happens at pygeoapi
Container startup)
for clarity you could move Dockerfile
and cite.config.yml
to pygeoapi
subdir (like ES).
Dockerfile.alpine can be removed
docker-compose.yml
: add pygeoapi
build (like ES build)
build.sh
should now have one line: docker-compose build
docker-compose.yml
: "5000:80" port mapping can be used for testing without Traefik.
docker-compose.yml
: last lines: network is required for deployment (for all Containers from different docker-compose files to connect to each other).
Completed at https://demo.pygeoapi.io/cite . Thanks @just for the help!
In relation to https://github.com/geopython/pygeoapi/issues/325, I would like to setup an instance at https://demo.pygeoapi.io/cite which provides CITE specific data, configuration and endpoint against pygeoapi master. The instance needs to have a very small and basic Elasticsearch backend (with a single index of 50 records) instance of to expose the full functionality needed for CITE. Basic workflow on a commit would be: