From: Kai Moritz Date: Sat, 12 Nov 2022 17:25:02 +0000 (+0100) Subject: Das Setup lässt sich mit `docker-compose up setup` starten X-Git-Tag: spring-consumer--topicpartition-DEPRECATED~8 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=797aae9c1e2e9a6795d529780dc5dfd3fb28ea5f;p=demos%2Fkafka%2Ftraining Das Setup lässt sich mit `docker-compose up setup` starten --- diff --git a/README.sh b/README.sh index 01d6d00..a85ad39 100755 --- a/README.sh +++ b/README.sh @@ -24,8 +24,6 @@ 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 up -d producer diff --git a/docker-compose.yml b/docker-compose.yml index 6d25cc1..bd15793 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,6 +34,8 @@ services: KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" ports: - 9081:9081 + depends_on: + - kafka-0 kafka-2: image: bitnami/kafka:3.3.1 @@ -58,6 +60,8 @@ services: default: aliases: - kafka + depends_on: + - kafka-0 kafka-3: image: bitnami/kafka:3.3.1 @@ -77,6 +81,9 @@ services: KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" ports: - 9083:9083 + depends_on: + - kafka-0 + setup: image: juplo/toolbox @@ -86,6 +93,10 @@ services: kafka-topics --bootstrap-server kafka:9092 --create --topic test --partitions 2 --replication-factor 3 --config min.insync.replicas=2 kafka-topics --bootstrap-server kafka:9092 --describe --topic test " + depends_on: + - kafka-1 + - kafka-2 + - kafka-3 cli: image: juplo/toolbox