umami/docker-compose-kafka.yml
2022-08-18 11:07:30 -07:00

84 lines
2.6 KiB
YAML

version: "3"
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka1:
image: 'bitnami/kafka:latest'
container_name: kafka1
ports:
- '9092:9092'
- '19092:19092'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:19092,EXTERNAL://0.0.0.0:9092
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka1:19092,EXTERNAL://dev-01.umami.dev:9092
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
kafka2:
image: 'bitnami/kafka:latest'
container_name: kafka2
ports:
- '9093:9093'
- '19093:19093'
environment:
- KAFKA_BROKER_ID=2
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:19093,EXTERNAL://0.0.0.0:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka2:19093,EXTERNAL://dev-01.umami.dev:9093
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
kafka3:
image: 'bitnami/kafka:latest'
container_name: kafka3
ports:
- '9094:9094'
- '19094:19094'
environment:
- KAFKA_BROKER_ID=3
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:19094,EXTERNAL://0.0.0.0:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka3:19094,EXTERNAL://dev-01.umami.dev:9094
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
# version: "3"
# services:
# zookeeper:
# image: 'bitnami/zookeeper:latest'
# ports:
# - '2181:2181'
# environment:
# - ALLOW_ANONYMOUS_LOGIN=yes
# kafka:
# image: 'bitnami/kafka:latest'
# ports:
# - '9092:9092'
# - '9093:9093'
# environment:
# - KAFKA_BROKER_ID=1
# - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
# - ALLOW_PLAINTEXT_LISTENER=yes
# - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
# - KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://0.0.0.0:9093
# - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://dev-01.umami.dev:9093
# - KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
# depends_on:
# - zookeeper