1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/kafka/cluster/docker-compose-kafka1.yml
2021-11-26 15:02:17 +08:00

29 lines
941 B
YAML

version: "3.8"
services:
kafka:
image: wurstmeister/kafka:2.13-2.7.1
ports:
- "9092:9092"
- "9999:9999"
hostname: kafka1
volumes:
- /data/kafka:/kafka
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka1:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
- KAFKA_JMX_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.rmi.port=9999
-Dcom.sun.management.jmxremote.port=9999
extra_hosts:
- zookeeper1:10.0.0.21
- zookeeper2:10.0.0.22
- zookeeper3:10.0.0.23
- kafka1:10.0.0.21
- kafka2:10.0.0.22
- kafka3:10.0.0.23
restart: unless-stopped