WIP
authorKai Moritz <kai@juplo.de>
Mon, 24 Oct 2022 15:33:02 +0000 (17:33 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 24 Oct 2022 15:33:02 +0000 (17:33 +0200)
docker-compose.yml

index 0355dbc..b3dc0f3 100644 (file)
@@ -1,17 +1,11 @@
 version: '3.2'
 services:
-  zookeeper:
-    image: confluentinc/cp-zookeeper:7.1.3
-    environment:
-      ZOOKEEPER_CLIENT_PORT: 2181
-    ports:
-      - 2181:2181
-
   kafka-1:
-    image: confluentinc/cp-kafka:7.1.3
+    image: confluentinc/cp-kafka:7.2.2
     environment:
       KAFKA_BROKER_ID: 1
-      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
+      KAFKA_PROCESS_ROLES: broker,controller
+      KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka-1:9092,2@kafka-2:9092,3@kafka-3:9092
       KAFKA_LISTENERS: DOCKER://:9092, LOCALHOST://:9081
       KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka-1:9092, LOCALHOST://localhost:9081
       KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
@@ -20,14 +14,13 @@ services:
       KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
     ports:
       - 9081:9081
-    depends_on:
-      - zookeeper
 
   kafka-2:
     image: confluentinc/cp-kafka:7.1.3
     environment:
       KAFKA_BROKER_ID: 2
-      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
+      KAFKA_PROCESS_ROLES: broker,controller
+      KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka-1:9092,2@kafka-2:9092,3@kafka-3:9092
       KAFKA_LISTENERS: DOCKER://:9092, LOCALHOST://:9082
       KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka-2:9092, LOCALHOST://localhost:9082
       KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
@@ -41,14 +34,13 @@ services:
       default:
         aliases:
           - kafka
-    depends_on:
-      - zookeeper
 
   kafka-3:
     image: confluentinc/cp-kafka:7.1.3
     environment:
       KAFKA_BROKER_ID: 3
-      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
+      KAFKA_PROCESS_ROLES: broker,controller
+      KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka-1:9092,2@kafka-2:9092,3@kafka-3:9092
       KAFKA_LISTENERS: DOCKER://:9092, LOCALHOST://:9083
       KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka-3:9092, LOCALHOST://localhost:9083
       KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
@@ -57,8 +49,6 @@ services:
       KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
     ports:
       - 9083:9083
-    depends_on:
-      - zookeeper
 
   setup:
     image: juplo/toolbox