-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
125 lines (114 loc) · 3.03 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '3'
services:
consumer: # node.js app for kafka consumers on port 3000
build:
context: .
dockerfile: ./Dockerfile
environment:
INFLUXDB_HOST: influxdb
KAFKA_HOST: "kafka:29092,kafka2:29092,kafka3:29092"
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
QUEUE_MAX_SIZE: ${QUEUE_MAX_SIZE}
depends_on:
- rsyslog
- zookeeper
- kafka
volumes:
- /app/node_modules
- ./consumer:/crato-app
rsyslog:
build:
context: ./rsyslog-central-server
environment:
KAFKA_HOST: kafka
ports:
- "514:514"
- "10514:10514"
depends_on:
- zookeeper
- kafka
volumes:
- rsyslog-data:/var/lib/rsyslog/data
- rsyslog-logs:/var/log/
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 8092
ZOOKEEPER_TICK_TIME: 2000
volumes:
- zookeeper-data:/var/lib/zookeeper/data
- zookeeper-logs/var/lib/zookeeper/log
kafka:
hostname: kafka
image: confluentinc/cp-kafka:latest
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:8092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
volumes:
- kafka-data:/var/lib/kafka/data
kafka2:
hostname: kafka2
image: confluentinc/cp-kafka:latest
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:8092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka2:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
volumes:
- kafka2-data:/var/lib/kafka/data
kafka3:
hostname: kafka3
image: confluentinc/cp-kafka:latest
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:8092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka3:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
volumes:
- kafka3-data:/var/lib/kafka/data
influxdb: #on port 8086
image: influxdb
environment:
INFLUXDB_DB: "crato_logs"
depends_on:
- consumer
volumes:
- influxdb-data:/var/lib/influxdb/data
chronograf:
image: chronograf
environment:
INFLUXDB_HOST: influxdb
INFLUXDB_PORT: 8086
ports:
- '8888:8888'
depends_on:
- consumer
- influxdb
volumes:
- chronograf-data:/var/lib/chronograf
volumes:
rsyslog-data:
rsyslog-logs:
zookeeper-data:
zookeeper-logs:
kafka-data:
kafka2-data:
kafka3-data:
influxdb-data:
chronograf-data: