-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose-only-kafka.yml
60 lines (56 loc) · 2.27 KB
/
docker-compose-only-kafka.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: "3"
services:
##################################################################################
# ZOOKEEPER - KAKFA CONTROL #
##################################################################################
zookeeper:
image: zookeeper:latest
hostname: zookeeper
container_name: zookeeper
networks:
- elastic
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOOKEEPER_SERVER_ID=1
- ZOOKEEPER_CLIENT_PORT=2181
#- ZOO_SERVERS: server.1=zookeeper:2888:3888
volumes:
- /tmp/zookeeper/data:/data
- /tmp/zookeeper/datalog:/datalog
- ./zookeeper/conf/zoo.cfg:/conf/zoo.cfg
##################################################################################
# KAFKA MAIN BROKER PROCESSOR #
##################################################################################
kafka:
image: confluentinc/cp-kafka:latest
hostname: broker
container_name: broker
networks:
- elastic
ports:
- "9092:9092"
environment:
- KAFKA_BROKER_ID=1
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
#- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
#- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS=LISTENER_DOCKER_INTERNAL://broker:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
- KAFKA_INTER_BROKER_LISTENER_NAME=LISTENER_DOCKER_INTERNAL
- KAFKA_LOG4J_LOGGERS="kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
volumes:
- /tmp/kafka/data:/var/lib/kafka/data
- ./tests:/usr/bin/tests
depends_on:
- zookeeper
#################################################################################
# NETWORKS #
##################################################################################
# Default network will be started
networks:
elastic:
driver: bridge