From: Kai Moritz Date: Sat, 14 Oct 2023 16:44:10 +0000 (+0200) Subject: Der Service `setup` wartet bereits auf den Cluster X-Git-Tag: grundlagen/docker---2023-10-signal~6 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=cc5a9b607cc8effcf4aa4a6c0c6bc6d19ffce32f;p=demos%2Fkafka%2Ftraining Der Service `setup` wartet bereits auf den Cluster --- diff --git a/README.sh b/README.sh index d6bfa02..2b451d7 100755 --- a/README.sh +++ b/README.sh @@ -6,10 +6,8 @@ then exit fi -docker-compose -f docker/docker-compose.yml up -d --remove-orphans zookeeper kafka-1 kafka-2 kafka-3 +docker-compose -f docker/docker-compose.yml up --remove-orphans setup docker-compose -f docker/docker-compose.yml ps -echo "Waiting for the Kafka-Cluster to become ready..." -docker-compose -f docker/docker-compose.yml run --rm cli cub kafka-ready -b kafka:9092 3 60 > /dev/null 2>&1 || exit 1 docker-compose -f docker/docker-compose.yml up -t0 -d cli sleep 1 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 1ae9e2d..23c53a1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -120,6 +120,7 @@ services: - bash - -c - | + cub kafka-ready -b kafka-1:9092,kafka-2:9092,kafka-3:9092 3 60 > /dev/null 2>&1 || exit 1 if [ -e INITIALIZED ] then echo -n Bereits konfiguriert: