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
2018-10-24 16:49:26 +08:00

28 lines
869 B
YAML

kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
- "9999:9999"
hostname: kafka1
volumes:
- /data/kafka:/kafka
- /var/run/docker.sock:/var/run/docker.sock
environment:
- KAFKA_ADVERTISED_HOST_NAME=kafka1
- KAFKA_ADVERTISED_PORT=9092
- KAFKA_BROKER_ID=1
- 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: always