From: Kai Moritz Date: Tue, 22 Nov 2022 20:48:34 +0000 (+0100) Subject: Verbesserungen an Vorführskript aus producer/simple-producer übernommen X-Git-Tag: rest-producer~1 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=dafa38875ffcb9f8aa34aece29786faf6ea0c50c;p=demos%2Fkafka%2Ftraining Verbesserungen an Vorführskript aus producer/simple-producer übernommen --- diff --git a/README.sh b/README.sh index 2649b38..9b15a70 100755 --- a/README.sh +++ b/README.sh @@ -4,12 +4,13 @@ IMAGE=juplo/rest-producer:1.0-SNAPSHOT if [ "$1" = "cleanup" ] then - docker-compose down -v + docker-compose down -v --remove-orphans mvn clean exit fi -docker-compose up -d kafka-0 kafka-1 kafka-2 kafka-3 cli +docker-compose up -d kafka-1 kafka-2 kafka-3 cli +docker-compose rm -svf producer if [[ $(docker image ls -q $IMAGE) == "" || @@ -22,9 +23,8 @@ else docker image ls $IMAGE fi -echo "Waiting for the Kafka-Cluster to become ready..." -docker-compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1 docker-compose up setup +docker-compose ps docker-compose up -d producer while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for producer..."; sleep 1; done