-
Notifications
You must be signed in to change notification settings - Fork 66
/
docker-compose.yml
63 lines (57 loc) · 1.52 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
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.3.1
hostname: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
kafka-1:
image: confluentinc/cp-kafka:5.3.1
hostname: kafka-1
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:9092
kafka-2:
image: confluentinc/cp-kafka:5.3.1
hostname: kafka-2
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-2:9092
kafka-3:
image: confluentinc/cp-kafka:5.3.1
hostname: kafka-3
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-3:9092
telegraf-topic:
image: confluentinc/cp-kafka:5.3.1
command: bash -c "cub kafka-ready -z zookeeper:2181 1 30 && kafka-topics --zookeeper zookeeper:2181 --create --topic telegraf --partitions 10 --replication-factor 3"
depends_on:
- zookeeper
telegraf:
image: telegraf:1.8
restart: unless-stopped
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- kafka-1
- kafka-2
- kafka-3
- telegraf-topic
stream:
build: streams/
depends_on:
- kafka-1
- kafka-2
- kafka-3
- telegraf