From: Kai Moritz Date: Mon, 16 Oct 2023 19:13:52 +0000 (+0200) Subject: Volumes für die Log-/Config-Daten und Zookeeper hinzugefügt X-Git-Tag: grundlagen/docker---2023-10-signal~11 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=ae395a9edcd0551a9a0cf0b690d477f9be28aa3d;p=demos%2Fkafka%2Ftraining Volumes für die Log-/Config-Daten und Zookeeper hinzugefügt --- diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ead6274..007f923 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,6 +6,9 @@ services: 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 @@ -18,6 +21,8 @@ services: 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: @@ -34,6 +39,8 @@ services: 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 @@ -55,6 +62,8 @@ services: 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: @@ -97,3 +106,10 @@ services: command: sleep infinity depends_on: - setup + +volumes: + zookeeper-data: + zookeeper-log: + kafka-1-data: + kafka-2-data: + kafka-3-data: