From c5751c06f763b07b9350735698292203dc01c016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Fri, 27 Mar 2020 13:31:22 +0100 Subject: [PATCH] added es namespace setting --- containers/zammad/docker-entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index f6dba2e..7917a42 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -6,6 +6,7 @@ set -e : "${ELASTICSEARCH_HOST:=zammad-elasticsearch}" : "${ELASTICSEARCH_PORT:=9200}" : "${ELASTICSEARCH_SCHEMA:=http}" +: "${ELASTICSEARCH_NAMESPACE:=zammad}" : "${ELASTICSEARCH_SSL_VERIFY:=true}" : "${MEMCACHED_HOST:=zammad-memcached}" : "${MEMCACHED_PORT:=11211}" @@ -70,6 +71,8 @@ if [ "$1" = 'zammad-init' ]; then echo "changing settings..." bundle exec rails r "Setting.set('es_url', '${ELASTICSEARCH_SCHEMA}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}')" + bundle exec rails r "Setting.set('es_index', '${ELASTICSEARCH_NAMESPACE}')" + if [ -n "${ELASTICSEARCH_USER}" ] && [ -n "${ELASTICSEARCH_PASS}" ]; then bundle exec rails r "Setting.set('es_user', \"${ELASTICSEARCH_USER}\")" bundle exec rails r "Setting.set('es_password', \"${ELASTICSEARCH_PASS}\")"