The original startup mode supports only the local ES, but the ES may be deployed on other hosts.
Signed-off-by: Wu Zhende wuzhende666@163.com --- container/kibana/start | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/container/kibana/start b/container/kibana/start index 6a504fb..dbb3c56 100755 --- a/container/kibana/start +++ b/container/kibana/start @@ -3,17 +3,27 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # frozen_string_literal: true
+require 'set' require_relative '../defconfig.rb'
-docker_rm "kibana" +names = Set.new %w[ + LOGGING_ES_HOST + LOGGING_ES_PORT +] + +defaults = relevant_defaults(names) +LOGGING_ES_HOST = defaults['LOGGING_ES_HOST'] || '172.17.0.1' +LOGGING_ES_PORT = defaults['LOGGING_ES_PORT'] || '9202' + +docker_rm 'kibana'
-cmd = %w[ +cmd = %W[ docker run --restart=always --name kibana -v /etc/localtime:/etc/localtime:ro -d - --link logging-es:elasticsearch + -e ELASTICSEARCH_HOSTS=http://#%7BLOGGING_ES_HOST%7D:#%7BLOGGING_ES_PORT%7D -p 11309:5601 kibana:7.6.2 ]