forked from wurstmeister/kafka-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (91 loc) · 2.14 KB
/
docker-compose.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: '3'
services:
kafka: &kafka
image: mcano/kafka:v1.0.0-0.10.2.0
env_file:
- config/kafka.properties
ports:
- 9092:9092
networks:
- kafka-stack-network
environment: &base
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_BROKER_ID: -1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ZOOKEEPER_TIMEOUT_MS: 500
KAFKA_DELETE_TOPIC_ENABLED: "true"
KAFKA_AUTO_CREATE_TOPICS_ENABLED: "true"
JMX_PORT: 9999
depends_on:
- zookeeper
kafka-2:
<<: *kafka
ports:
- 9093:9092
environment:
<<: *base
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-2:9092
kafka-3:
<<: *kafka
ports:
- 9094:9092
environment:
<<: *base
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-3:9092
kafka-rest:
image: confluentinc/cp-kafka-rest:3.2.2
ports:
- 8082:8082
networks:
- kafka-stack-network
environment:
- KAFKA_REST_ZOOKEEPER_CONNECT=zookeeper
- KAFKA_REST_ID=1
- KAFKA_REST_LISTENERS=http://0.0.0.0:8082/
- KAFKA_REST_HOST_NAME=kafka-rest
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8082/"]
interval: 1m30s
timeout: 10s
retries: 3
depends_on:
- zookeeper
- kafka
- kafka-2
zookeeper:
image: zookeeper:3.4
ports:
- 2181:2181
environment:
- ZOO_TICK_TIME=4000
networks:
- kafka-stack-network
kafka-manager:
image: sheepkiller/kafka-manager:latest
ports:
- "9000:9000"
links:
- zookeeper
- kafka
environment:
ZK_HOSTS: zookeeper:2181
APPLICATION_SECRET: letmein
KM_ARGS: -Djava.net.preferIPv4Stack=true
JMX_PORT: 9999
networks:
- kafka-stack-network
depends_on:
- zookeeper
# visualizer:
# image: dockersamples/visualizer:stable
# ports:
# - "8080:8080"
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# # deploy:
# # placement:
# # constraints: [node.role == manager]
# networks:
# - kafka-stack-network
networks:
kafka-stack-network: