From fc9481155a63b4433184ae4f87f608af1dc76dd2 Mon Sep 17 00:00:00 2001 From: calvinosanch Date: Fri, 26 Jul 2019 10:46:00 +0000 Subject: [PATCH] BUG 703 fix - Check if zookeeper is initialized before kafka Change-Id: I93810203efd9de329f1ecbdd9970ef3cf266c16b Signed-off-by: calvinosanch --- installers/docker/docker-compose.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/installers/docker/docker-compose.yaml b/installers/docker/docker-compose.yaml index 621664ac..c325776c 100644 --- a/installers/docker/docker-compose.yaml +++ b/installers/docker/docker-compose.yaml @@ -1,3 +1,21 @@ +## +# Copyright 2019 ETSI +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +## + +######################################################################## + version: '3' volumes: ro: @@ -39,6 +57,11 @@ services: KAFKA_LOG_RETENTION_HOURS: 24 volumes: - /var/run/docker.sock:/var/run/docker.sock + healthcheck: + test: zookeeper-shell.sh zookeeper:2181 ls /brokers/ids 2>&1 | grep "Node does not exist" && exit 1 || exit 0 + interval: 20s + timeout: 10s + retries: 5 #depends_on: # - zookeeper mongo: -- 2.25.1