WIP simple-consumer--kraft-bitnami--healthcheck
authorKai Moritz <kai@juplo.de>
Fri, 28 Oct 2022 13:56:14 +0000 (15:56 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 1 Nov 2022 10:06:14 +0000 (11:06 +0100)
docker-compose.yml

index 024b4d8..1899b8c 100644 (file)
@@ -15,6 +15,8 @@ services:
       ALLOW_PLAINTEXT_LISTENER: 'yes'
       KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
       KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
+    healthcheck:
+      test: [ "CMD", "kafka-topics.sh", "--bootstrap-server", ":9092", "--list" ]
 
   kafka-1:
     image: bitnami/kafka:3.3.1
@@ -36,6 +38,9 @@ services:
       - 9081:9081
     healthcheck:
       test: [ "CMD", "kafka-topics.sh", "--bootstrap-server", ":9092", "--list" ]
+    depends_on:
+      kafka-0:
+        condition: service_healthy
 
   kafka-2:
     image: bitnami/kafka:3.3.1
@@ -62,6 +67,9 @@ services:
           - kafka
     healthcheck:
       test: [ "CMD", "kafka-topics.sh", "--bootstrap-server", ":9092", "--list" ]
+    depends_on:
+      kafka-0:
+        condition: service_healthy
 
   kafka-3:
     image: bitnami/kafka:3.3.1
@@ -83,6 +91,9 @@ services:
       - 9083:9083
     healthcheck:
       test: [ "CMD", "kafka-topics.sh", "--bootstrap-server", ":9092", "--list" ]
+    depends_on:
+      kafka-0:
+        condition: service_healthy
 
   setup:
     image: juplo/toolbox