Skip to content

Commit

Permalink
[新增] 新增纯 Kafka 3 Docker Compose 配置,无需再额外 Zookeeper(如果要使用 Debezium,建议使…
Browse files Browse the repository at this point in the history
…用 Debezium 套件,这种情况下还需要启动 Zookeeper。目前还没有找到 Debezium Kafka 单点环境脱离 Zookeeper 的方案)
  • Loading branch information
herodotus-ecosystem committed May 28, 2024
1 parent fc623f3 commit f92804a
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions configurations/docker/docker-compose/linux/herodotus/env.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,25 @@ services:
- "9848:9848"
- "9849:9849"

zookeeper:
image: debezium/zookeeper:2.6
container_name: zookeeper
hostname: zookeeper
environment:
ZOOKEEPER_SERVER_ID: 1
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"

kafka:
image: debezium/kafka:2.6
image: apache/kafka:3.7.0
container_name: kafka
hostname: kafka
hostname: broker
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT_HOST://192.168.101.10:9092,PLAINTEXT://broker:19092'
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'CONTROLLER://:29093,PLAINTEXT_HOST://:9092,PLAINTEXT://:19092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
ports:
- "9092:9092"
environment:
BROKER_ID: 1
ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: LISTENER_INNER://kafka:29092,LISTENER_OUTER://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: LISTENER_INNER://kafka:29092,LISTENER_OUTER://192.168.101.10:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_INNER:PLAINTEXT,LISTENER_OUTER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_INNER
KAFKA_ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
depends_on:
- zookeeper

sentinel:
image: herodotus/sentinel-dashboard:1.8.7
Expand Down

0 comments on commit f92804a

Please sign in to comment.