update zammad version & made es reindex optional (#175)

Signed-off-by: André Bauer <monotek23@gmail.com>
This commit is contained in:
André Bauer 2020-09-25 14:35:49 +02:00 committed by GitHub
parent 297c3f8004
commit 7d15c4909a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 8 deletions

2
.env
View File

@ -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

View File

@ -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"]

View File

@ -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"]

View File

@ -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

View File

@ -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,11 +102,13 @@ if [ "$1" = 'zammad-init' ]; then
SSL_SKIP_VERIFY=""
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
chown -R "${ZAMMAD_USER}":"${ZAMMAD_USER}" "${ZAMMAD_DIR}"