Add ELASTICSEARCH_SSL_VERIFY environment variable in Zammad entrypoint

Setting it to "false" will skip TLS verification when interacting with Elasticsearch.
This commit is contained in:
Daniel Lohse 2019-07-03 00:40:43 +02:00
parent d7433881b5
commit d6773104ff
No known key found for this signature in database
GPG Key ID: 2965338C02FB67DF

View File

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