From 7d15c4909a777642ce96f3cde9ff5c937422f8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Fri, 25 Sep 2020 14:35:49 +0200 Subject: [PATCH] update zammad version & made es reindex optional (#175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Bauer --- .env | 2 +- containers/zammad-elasticsearch/Dockerfile | 2 +- containers/zammad-postgresql/Dockerfile | 2 +- containers/zammad/Dockerfile | 2 +- containers/zammad/docker-entrypoint.sh | 11 +++++++---- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.env b/.env index b013eff..65a53d9 100644 --- a/.env +++ b/.env @@ -3,4 +3,4 @@ POSTGRES_PASS=zammad POSTGRES_USER=zammad RESTART=always # don't forget to add the minus before the version -VERSION=-3.4.0-4 +VERSION=-3.5.0-2 diff --git a/containers/zammad-elasticsearch/Dockerfile b/containers/zammad-elasticsearch/Dockerfile index 901ff79..b9e5dd4 100644 --- a/containers/zammad-elasticsearch/Dockerfile +++ b/containers/zammad-elasticsearch/Dockerfile @@ -9,7 +9,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.vcs-url="https://github.com/zammad/zammad" \ org.label-schema.vcs-type="Git" \ org.label-schema.vendor="Zammad" \ - org.label-schema.schema-version="3.4.0" \ + org.label-schema.schema-version="3.5.0" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] diff --git a/containers/zammad-postgresql/Dockerfile b/containers/zammad-postgresql/Dockerfile index 9694b99..298df22 100644 --- a/containers/zammad-postgresql/Dockerfile +++ b/containers/zammad-postgresql/Dockerfile @@ -10,7 +10,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.vcs-url="https://github.com/zammad/zammad" \ org.label-schema.vcs-type="Git" \ org.label-schema.vendor="Zammad" \ - org.label-schema.schema-version="3.4.0" \ + org.label-schema.schema-version="3.5.0" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] diff --git a/containers/zammad/Dockerfile b/containers/zammad/Dockerfile index d7992d2..22276bc 100644 --- a/containers/zammad/Dockerfile +++ b/containers/zammad/Dockerfile @@ -37,7 +37,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.vcs-url="https://github.com/zammad/zammad" \ org.label-schema.vcs-type="Git" \ org.label-schema.vendor="Zammad" \ - org.label-schema.schema-version="3.4.0" \ + org.label-schema.schema-version="3.5.0" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" ENV GIT_BRANCH stable diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index d33cca5..355fa76 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -8,6 +8,7 @@ set -e : "${ELASTICSEARCH_PORT:=9200}" : "${ELASTICSEARCH_SCHEMA:=http}" : "${ELASTICSEARCH_NAMESPACE:=zammad}" +: "${ELASTICSEARCH_REINDEX:=true}" : "${ELASTICSEARCH_SSL_VERIFY:=true}" : "${MEMCACHED_HOST:=zammad-memcached}" : "${MEMCACHED_PORT:=11211}" @@ -101,10 +102,12 @@ if [ "$1" = 'zammad-init' ]; then SSL_SKIP_VERIFY="" fi - if ! curl -s ${SSL_SKIP_VERIFY} ${ELASTICSEARCH_SCHEMA}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_cat/indices | grep -q zammad; then - echo "rebuilding es searchindex..." - bundle exec rake searchindex:rebuild - fi + if [ "${ELASTICSEARCH_REINDEX}" == "true" ]; then + if ! curl -s ${SSL_SKIP_VERIFY} ${ELASTICSEARCH_SCHEMA}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_cat/indices | grep -q zammad; then + echo "rebuilding es searchindex..." + bundle exec rake searchindex:rebuild + fi + fi fi # chown everything to zammad user