Files
pygeoapi/docker/compose/ES/Dockerfile
T
Jorge Samuel Mendes de Jesus c1e9943c48 Docker composition (ES docker + pygeoapi docker) (#31)
* 	new file:   docker/Dockerfile
Dockerfile for pygeoapi

* Using 0.0.0.0 in pygeoapi-config otherwise no docker for flask

* ES and pygeoapi docker

* Final file structure

* generic port 5000 and localhost

* sqlit3 suport in alpine and fixes on sqlite provider

* B4 sync with upstream

* Working composition problems with ES features

* Cosmetic changes update to README.md

* using load_es_data.py from github local openapi.yml

* added docker pull only of pygeoapi

* b4 rebase

* Using 0.0.0.0 in pygeoapi-config otherwise no docker for flask

* ES and pygeoapi docker

* Final file structure

* generic port 5000 and localhost

* sqlit3 suport in alpine and fixes on sqlite provider

* B4 sync with upstream

* Cosmetic changes update to README.md

* using load_es_data.py from github local openapi.yml

* added docker pull only of pygeoapi

* b4 rebase

* updates and sync

* missing proper local.config.yml

* wait-for pygeoapi

* sync with master config

* 	deleted:    docker/ES/wait-for-it.sh
	new file:   docker/pygeoapi/docker-entrypoint.sh
	new file:   docker/pygeoapi/run_pygeoapi.sh
	openapi.yml
	pygeoapi/provider/__sqlite.py

Missing sh files

* missing set +e

* wait for ES to be yellow or green

* More detailed Readme

* 	new file:   .gitignore

* simple image docker

* missing docker run

* 	new file:   Dockerfile
	new file:   docker.config.yml
	new file:   run_pygeoapi.sh
Simple image

* typos on README
2018-07-03 14:52:17 -04:00

39 lines
1.4 KiB
Docker

FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.8
LABEL maintainer="jorge.dejesus@geocat.net"
ARG DATA_FOLDER=/usr/share/elasticsearch/data
USER root
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY add_data.sh /add_data.sh
RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O bin/wait-for-it.sh
RUN wget https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/data/ne_110m_populated_places_simple.geojson -O /ne_110m_populated_places_simple.geojson
RUN chmod +x bin/wait-for-it.sh
RUN echo "xpack.security.enabled: false" >> config/elasticsearch.yml
RUN echo "http.host: 0.0.0.0" >> config/elasticsearch.yml
RUN yum -y install python-setuptools \
&& easy_install elasticsearch \
&& yum clean packages
RUN wget https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_es_data.py -O /load_es_data.py
USER elasticsearch
CMD ["/usr/share/elasticsearch/bin/elasticsearch"]
ENTRYPOINT ["/docker-entrypoint.sh"]
# we need to run this on host
#sudo sysctl -w vm.max_map_count=262144
#check indices
#http://localhost:9200/_cat/indices?v
#check spatial data
#http://localhost:9200/ne_110m_populated_places_simple/
#This docker compose was inspired on:
#https://discuss.elastic.co/t/best-practice-for-creating-an-index-when-an-es-docker-container-starts/126651
#docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" es:latest