- upgrading the docker example to use ES=8, running in compatibility mode (so we don't break the python client) (#985)

This commit is contained in:
Jo
2022-10-16 22:04:11 +02:00
committed by GitHub
parent 2e686267ac
commit fd5ea069ea
2 changed files with 8 additions and 5 deletions
+4 -5
View File
@@ -31,7 +31,7 @@
#
# =================================================================
FROM docker.elastic.co/elasticsearch/elasticsearch:7.5.1
FROM docker.elastic.co/elasticsearch/elasticsearch:8.4.0
LABEL maintainer="jorge.dejesus@geocat.net justb4@gmail.com"
ARG DATA_FOLDER=/usr/share/elasticsearch/data
@@ -41,7 +41,7 @@ USER root
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY add_data.sh /add_data.sh
RUN yum install -y wget
RUN apt update && apt install -y wget
RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O bin/wait-for-it.sh
RUN chmod +x bin/wait-for-it.sh
@@ -52,10 +52,9 @@ RUN echo "xpack.security.enabled: false" >> config/elasticsearch.yml
RUN echo "http.host: 0.0.0.0" >> config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> config/elasticsearch.yml
RUN yum --enablerepo=extras -y install epel-release \
&& yum install -y python3 python3-pip python3-setuptools python-typing \
RUN apt install -y python3 python3-pip python3-setuptools python-typing \
&& pip3 install --upgrade pip elasticsearch==7.17.1 elasticsearch-dsl \
&& yum clean packages
&& apt clean packages
USER elasticsearch
@@ -62,6 +62,10 @@ services:
ports:
- 9300:9300
- 9200:9200
environment:
ELASTIC_CLIENT_APIVERSIONING: 1
# Enabling compatibility mode in ES
# https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/migration.html#migration-compat-mode
volumes:
- elastic_search_data:/usr/share/elasticsearch/data