ZOOKEEPER_CLIENT_PORT: 2181
ports:
- 2181:2181
+ volumes:
+ - zookeeper-data:/var/lib/zookeeper/data
+ - zookeeper-log:/var/lib/zookeeper/log
kafka-1:
image: confluentinc/cp-kafka:7.5.1
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
+ volumes:
+ - kafka-1-data:/var/lib/kafka/data
ports:
- 9081:9081
depends_on:
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
+ volumes:
+ - kafka-2-data:/var/lib/kafka/data
ports:
- 9092:9082
- 9082:9082
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
+ volumes:
+ - kafka-3-data:/var/lib/kafka/data
ports:
- 9083:9083
depends_on:
command: sleep infinity
depends_on:
- setup
+
+volumes:
+ zookeeper-data:
+ zookeeper-log:
+ kafka-1-data:
+ kafka-2-data:
+ kafka-3-data: