Created
October 12, 2024 17:33
-
-
Save sushant12/b41097760189261ef1769f872516b27e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zookeeper: # | |
image: zookeeper:3.4.9 | |
hostname: zookeeper | |
deploy: | |
resources: | |
limits: | |
cpus: '3' | |
memory: 200m | |
ports: | |
- "2181:2181" | |
networks: | |
- net | |
environment: | |
ZOO_MY_ID: 1 | |
ZOO_PORT: 2181 | |
ZOO_SERVERS: server.1=zookeeper:2888:3888 | |
volumes: | |
- ./data/zookeeper/data:/data | |
- ./data/zookeeper/datalog:/datalog | |
kafka1: | |
image: confluentinc/cp-kafka:5.3.0 | |
hostname: kafka1 | |
ports: | |
- "9091:9091" | |
environment: | |
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19091,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9091 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT | |
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL | |
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" | |
KAFKA_BROKER_ID: 1 | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
KAFKA_OPTS: "-javaagent:/opt/jmx_exporter/jmx_prometheus_javaagent-0.16.0.jar=9404:/opt/jmx_exporter/kafka-2_0_0.yml" | |
volumes: | |
- ./data/kafka1/data:/var/lib/kafka/data | |
- ./jmx_exporter:/opt/jmx_exporter | |
depends_on: | |
- zookeeper | |
networks: | |
- net | |
deploy: | |
resources: | |
limits: | |
cpus: '2' | |
memory: 900m | |
kafdrop: | |
image: obsidiandynamics/kafdrop | |
restart: "no" | |
ports: | |
- "9000:9000" | |
environment: | |
KAFKA_BROKERCONNECT: "kafka1:19091" | |
depends_on: | |
- kafka1 | |
networks: | |
- net | |
deploy: | |
resources: | |
limits: | |
cpus: '1' | |
memory: 200m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment