-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
87 lines (85 loc) · 2.17 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
version: "3.9"
services:
frontend:
build: ./frontend
container_name: frontend
ports:
- "80:80"
depends_on:
- backend
backend:
build: ./backend
container_name: backend
ports:
- "3000:3000"
depends_on:
- mongodb
- kafka
environment:
- MONGO_URI=mongodb://root:example@mongodb:27017/mydatabase?authSource=admin
- KAFKA_HOST=kafka:9092
alert-server:
build: ./alert-server
container_name: alert-server
ports:
- "9000:9000"
depends_on:
- mongodb
environment:
- MONGO_URI=mongodb://root:example@mongodb:27017/mydatabase?authSource=admin
collect-server:
container_name: collect-server
build: ./collect-server
depends_on:
- mongodb
- kafka
- alert-server
- analysis-servers
analysis-servers:
container_name: analysis-servers
build: ./analysis-servers
ports:
- "8000:8000"
mongodb:
image: mongo:latest
command: mongod --bind_ip_all
container_name: mongodb
ports:
- "27017:27017"
volumes:
- ./data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
zookeeper:
image: docker.io/bitnami/zookeeper:3.8
container_name: zookeeper
ports:
- "2181:2181"
volumes:
- zookeeper_data:/bitnami
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: docker.io/bitnami/kafka:3.4
container_name: kafka
ports:
- "9092:9092"
- "9094:9094"
volumes:
- kafka_data:/bitnami
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_ENABLE_KRAFT=no
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
restart: always
depends_on:
- zookeeper
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local