DEPRICATED: Ersetzt durch 'customized'
[demos/kafka/training] / docker-compose.yml
1 version: '3.2'
2 services:
3   zookeeper:
4     image: confluentinc/cp-zookeeper:6.2.0
5     environment:
6       ZOOKEEPER_CLIENT_PORT: 2181
7     ports:
8       - 2181:2181
9
10   kafka:
11     image: confluentinc/cp-kafka:6.2.0
12     environment:
13       KAFKA_BROKER_ID: 1
14       KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
15       KAFKA_LISTENERS: DOCKER://:9092, LOCALHOST://:9082
16       KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka:9092, LOCALHOST://localhost:9082
17       KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
18       KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: DOCKER:PLAINTEXT, LOCALHOST:PLAINTEXT
19       KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
20       KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
21     ports:
22       - 9092:9082
23       - 9082:9082
24     depends_on:
25       - zookeeper
26
27   kafka-ui:
28     image: provectuslabs/kafka-ui:0.2.1
29     ports:
30       - 8080:8080
31     environment:
32       KAFKA_CLUSTERS_0_NAME: local
33       KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
34
35   cli:
36     image: juplo/toolbox
37     command: sleep infinity
38
39   producer:
40     image: juplo/manual-partitioning:1.0-SNAPSHOT
41     ports:
42       - 8000:8080
43     environment:
44       producer.bootstrap-server: kafka:9092
45       producer.client-id: producer
46       producer.topic: test
47       producer.throttle-ms: 10
48
49   count-0:
50     image: juplo/toolbox
51     command: >
52       bash -c "
53         kafka-console-consumer \
54           --bootstrap-server kafka:9092 \
55           --topic test \
56           --partition 0 \
57           --property print.key=true \
58           --property print.value=false \
59           --from-beginning \
60           --timeout-ms 1000 2>/dev/null | sort | uniq -c
61       "
62
63   count-1:
64     image: juplo/toolbox
65     command: >
66       bash -c "
67         kafka-console-consumer \
68           --bootstrap-server kafka:9092 \
69           --topic test \
70           --partition 1 \
71           --property print.key=true \
72           --property print.value=false \
73           --from-beginning \
74           --timeout-ms 1000 2>/dev/null | sort | uniq -c
75       "
76
77   count-2:
78     image: juplo/toolbox
79     command: >
80       bash -c "
81         kafka-console-consumer \
82           --bootstrap-server kafka:9092 \
83           --topic test \
84           --partition 2 \
85           --property print.key=true \
86           --property print.value=false \
87           --from-beginning \
88           --timeout-ms 1000 2>/dev/null | sort | uniq -c
89       "
90
91   count-3:
92     image: juplo/toolbox
93     command: >
94       bash -c "
95         kafka-console-consumer \
96           --bootstrap-server kafka:9092 \
97           --topic test \
98           --partition 3 \
99           --property print.key=true \
100           --property print.value=false \
101           --from-beginning \
102           --timeout-ms 1000 2>/dev/null | sort | uniq -c
103       "
104
105   count-4:
106     image: juplo/toolbox
107     command: >
108       bash -c "
109         kafka-console-consumer \
110           --bootstrap-server kafka:9092 \
111           --topic test \
112           --partition 4 \
113           --property print.key=true \
114           --property print.value=false \
115           --from-beginning \
116           --timeout-ms 1000 2>/dev/null | sort | uniq -c
117       "
118
119   count-5:
120     image: juplo/toolbox
121     command: >
122       bash -c "
123         kafka-console-consumer \
124           --bootstrap-server kafka:9092 \
125           --topic test \
126           --partition 5 \
127           --property print.key=true \
128           --property print.value=false \
129           --from-beginning \
130           --timeout-ms 1000 2>/dev/null | sort | uniq -c
131       "
132
133   count-6:
134     image: juplo/toolbox
135     command: >
136       bash -c "
137         kafka-console-consumer \
138           --bootstrap-server kafka:9092 \
139           --topic test \
140           --partition 6 \
141           --property print.key=true \
142           --property print.value=false \
143           --from-beginning \
144           --timeout-ms 1000 2>/dev/null | sort | uniq -c
145       "
146
147   count-7:
148     image: juplo/toolbox
149     command: >
150       bash -c "
151         kafka-console-consumer \
152           --bootstrap-server kafka:9092 \
153           --topic test \
154           --partition 7 \
155           --property print.key=true \
156           --property print.value=false \
157           --from-beginning \
158           --timeout-ms 1000 2>/dev/null | sort | uniq -c
159       "