From d6773104ff1280c0ffaa842628d66b8558019394 Mon Sep 17 00:00:00 2001 From: Daniel Lohse Date: Wed, 3 Jul 2019 00:40:43 +0200 Subject: [PATCH] Add ELASTICSEARCH_SSL_VERIFY environment variable in Zammad entrypoint Setting it to "false" will skip TLS verification when interacting with Elasticsearch. --- containers/zammad/docker-entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index f7a1189..03da99f 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -92,7 +92,12 @@ if [ "$1" = 'zammad-init' ]; then sleep 5 done - if ! curl -s -k ${ELASTICSEARCH_SCHEMA}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_cat/indices | grep -q zammad; then + if [ "${ELASTICSEARCH_SSL_VERIFY}" == "false" ]; then + SSL_SKIP_VERIFY="-k" + else + 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