205ff3002c
* Add gzip to API.py * pytest for gzip * fix pytest * Update test_api.py * Add gzip to server block of configuration files * Update api.py to include gzip opts from config Update logic behind gzip compression such that compression will only happen when gzip in the Accept-Encoding request header and config.server.gzip is True. Use server charset for encoding/decoding and include charset in Content-Type when compressed. * Update pytest to use gzip config options Update pytest to test with (gzip in Accept-Encoding & server.gzip = False), (gzip in Accept-Encoding & server.gzip = True), (gzip not in Accept-Encoding & server.gzip = True) * Better Content Negotiation (#7) * Change content negotiation in _get_format() * Add to pytest and force h to always be string * Force F_JSON to default response * Update test_api.py for utf-16 encoding * better content negotiation pytest. * Add comments to pytest * Fix flake 8 * Improve docstring for gzip decorator function
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: 5.6.8 on CentosOS 7
- 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