-
Notifications
You must be signed in to change notification settings - Fork 1
/
single-kafka.yml
46 lines (41 loc) · 1.27 KB
/
single-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
services:
zookeeper:
image: zookeeper:3.6.3
ports:
- "2181:2181"
restart: on-failure
kafka:
image: moukoublen/kafka:latest
ports:
- "9094:9094"
environment:
KAFKA_CONFIG_SOURCE: env
server.broker.id: 1
server.zookeeper.connect: zookeeper:2181
server.listeners: INSIDE://kafka:9092,OUTSIDE://kafka:9094
server.advertised.listeners: INSIDE://kafka:9092,OUTSIDE://localhost:9094
server.listener.security.protocol.map: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
server.inter.broker.listener.name: INSIDE
server.auto.create.topics.enable: "false"
log4j.logger.kafka: DEBUG
log4j.logger.org.apache.kafka: DEBUG
depends_on:
- zookeeper
restart: on-failure
topics-seed:
image: moukoublen/kafka:latest
restart: on-failure
command: >
bash -c "set -ex
echo 'Seeding topics'
kafka-topics.sh --bootstrap-server 'INSIDE://kafka:9092' \\
--create \\
--topic samples1 \\
--partitions 9 \\
--if-not-exists
kafka-topics.sh --bootstrap-server 'INSIDE://kafka:9092' \\
--create \\
--topic samples2 \\
--partitions 9 \\
--if-not-exists
kafka-topics.sh --bootstrap-server 'INSIDE://kafka:9092' --list"