Files
pygeoapi/docker/examples/elastic
KingGooseJr 169450f342 commented elastic ports in example docker-compose and added warning a… (#1382)
* commented elastic ports in example docker-compose and added warning about opening ports in production

* commented elastic ports in example docker-compose and added warning about opening ports in production
2023-10-31 05:25:01 -04:00
..

pygeoapi with Elasticsearch (ES)

These folders contain a Docker Compose configuration necessary to setup a minimal pygeoapi server that uses a local ES backend service.

This config is only for local development and testing.

Elasticsearch

  • official Elasticsearch: 8.4.0 on Ubuntu 20.04.4 LTS (Focal Fossa)
  • ports 9300 and 9200

ES requires the host system to have its virtual memory parameter (max_map_count) here set as follows:

sudo sysctl -w vm.max_map_count=262144

If the docker composition fails with the following error:

docker_elastic_search_1 exited with code 78

it is very likely that you forgot to setup the sysctl.

Building and Running

To build and run the Docker compose file in localhost:

sudo sysctl -w vm.max_map_count=262144
docker-compose build
docker-compose up