From 1d930e91e1b8e507112b00be5d38e5aecd34220b Mon Sep 17 00:00:00 2001 From: Nathaniel Date: Sat, 9 Dec 2023 11:18:57 -0700 Subject: [PATCH] update kafka docker compose to work with examples --- docker/kafka/docker-compose.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/docker/kafka/docker-compose.yml b/docker/kafka/docker-compose.yml index 82a7015..7504a2e 100644 --- a/docker/kafka/docker-compose.yml +++ b/docker/kafka/docker-compose.yml @@ -8,8 +8,6 @@ services: image: docker.io/bitnami/zookeeper:3.7 ports: - "2181:2181" - volumes: - - "/data/databases/kafka/zoo/:/bitnami" environment: - ALLOW_ANONYMOUS_LOGIN=yes networks: @@ -17,15 +15,14 @@ services: kafka1: image: bitnami/kafka:latest ports: - - "9092:9092" - volumes: - - "/data/databases/kafka/1/:/bitnami" + - 29092:29092 environment: - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 - ALLOW_PLAINTEXT_LISTENER=yes - KAFKA_BROKER_ID=1 - - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092 - - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka1:9092 + - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,EXTERNAL://0.0.0.0:29092 + - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka1:9092,EXTERNAL://127.0.0.1:29092 + - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT depends_on: - zookeeper networks: @@ -33,15 +30,14 @@ services: kafka2: image: bitnami/kafka:latest ports: - - "9093:9093" - volumes: - - "/data/databases/kafka/2/:/bitnami" + - 29093:29093 environment: - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 - ALLOW_PLAINTEXT_LISTENER=yes - KAFKA_BROKER_ID=2 - - KAFKA_CFG_LISTENERS=PLAINTEXT://:9093 - - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka2:9093 + - KAFKA_CFG_LISTENERS=PLAINTEXT://:9093,EXTERNAL://0.0.0.0:29093 + - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka2:9093,EXTERNAL://127.0.0.1:29093 + - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT depends_on: - zookeeper networks: @@ -49,15 +45,14 @@ services: kafka3: image: bitnami/kafka:latest ports: - - "9094:9094" - volumes: - - "/data/databases/kafka/3/:/bitnami" + - 29094:29094 environment: - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 - ALLOW_PLAINTEXT_LISTENER=yes - KAFKA_BROKER_ID=3 - - KAFKA_CFG_LISTENERS=PLAINTEXT://:9094 - - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka3:9094 + - KAFKA_CFG_LISTENERS=PLAINTEXT://:9094,EXTERNAL://0.0.0.0:29094 + - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka3:9094,EXTERNAL://127.0.0.1:29094 + - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT depends_on: - zookeeper networks: