-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
81 lines (74 loc) · 2.28 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
version: "3"
services:
event-producer:
build:
context: ./cmd/event-producer
container_name: event-producer
ports:
- "4000:4000"
depends_on:
- kafka_broker
event-consumer:
build:
context: ./cmd/event-consumer
container_name: event-consumer
ports:
- "3001:3001"
depends_on:
- kafka_broker
- cassandra
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
hostname: zookeeper
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka_broker:
image: confluentinc/cp-kafka:7.3.0
container_name: kafka_broker
ports:
- "9094:9094"
depends_on:
- zookeeper
restart: on-failure
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_LISTENERS: INTERNAL://0.0.0.0:9092,OUTSIDE://0.0.0.0:9094
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka_broker:9092,OUTSIDE://localhost:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka_broker:9092,PLAINTEXT_INTERNAL://kafka_broker:9092,PLAINTEXT_OUTSIDE://localhost:9094
# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka_broker:9092,PLAINTEXT_INTERNAL://kafka_broker:29092,PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://localhost:29092
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
cassandra:
image: cassandra:latest
container_name: cassandra
ports:
- "9042:9042"
environment:
- CASSANDRA_CLUSTER_NAME=MyCluster
- CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
volumes:
- ./local/data/db/cassandra:/var/lib/cassandra
influxdb:
image: influxdb:latest
container_name: influxdb
env_file:
- ./config/influxdb/influxdb.env
ports:
- "8086:8086"
volumes:
- ./local/data/db/influxdb:/var/lib/influxdb2:rw
telegraf:
image: telegraf:latest
container_name: telegraf
env_file:
- ./config/influxdb/influxdb.env
volumes:
- ./config/influxdb/telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- influxdb