-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
127 lines (123 loc) · 3.59 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
126
127
version: '3.2'
services:
db:
hostname: mysql
image: mysql:5.7.31
restart: always
ports:
- 3307:3306
volumes:
- ./mysql/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: toiot1234
MYSQL_USER: toiot
MYSQL_PASSWORD: toiot1234
MYSQL_DATABASE: toiot
app:
hostname: app
image : ksh24865/toiot-app:0.0.1
restart: always
ports:
- 8081:8081
environment:
APP_SERVER: 0.0.0.0:8081
DB_DRIVE: mysql
DB_SERVER: db:3306
DB_USER: toiot
DB_PASS: toiot1234
DB_DATABASE: toiot
TOPIC_NAME: sensor-data
depends_on:
- db
links:
- db
ui:
hostname: ui
image: ksh24865/toiot-ui:0.0.1
ports:
- 3000:3000
environment:
- NODE_ENV=development
- CHOIDAR_USEPOLLING=true
- REACT_APP_DB_IP=app
- REACT_APP_DB_PORT=8081
- REACT_APP_KIBANA_IP=kibana
- REACT_APP_KIBANA_PORT=5601
- REACT_APP_HEALTHCHECK_IP=health
- REACT_APP_HEALTHCHECK_PORT=8083
logic:
hostname: logic
image: ksh24865/toiot-logic:0.0.1
restart: always
ports:
- 8082:8082
environment:
LOGIC_SERVER: 0.0.0.0:8082
LOGIC_LISTEN: logic:8082
APP_SERVER: app:8081
KAFKA_BROKER: kafka:9092
KAFKA_GROUP: logic1
KAFKA_TOPIC: sensor-data
ELASTIC_SERVER: elasticsearch:9200
depends_on:
- app
links:
- app
health:
hostname: health
image: ksh24865/toiot-health:0.0.3
restart: always
ports:
- 8083:8083
environment:
HEALTH_SERVER: 0.0.0.0:8083
HEALTH__LISTEN: 0.0.0.0:8082
APP_SERVER: app:8081
zookeeper:
hostname: zookeeper
image: bitnami/zookeeper:3.6.1
ports:
- 2181:2181
volumes:
- ./zookeeper/data:/zookeeper/data
- ./zookeeper/datalog:/zookeeper/datalog
- ZOO_HEAP_SIZE=-Xmx128m -Xms128m
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
hostname: kafka
image: bitnami/kafka:2.5.0
ports:
- 9092:9092
volumes:
- ./kafka/data:/kafka/data
environment:
- KAFKA_BROKER_ID=1
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_HEAP_OPTS=-Xmx256m -Xms256m
# - KAFKA_LISTENERS=PLAINTEXT://:9092
# - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
command: "bash -c 'kafka-topics --create --if-not-exists --zookeeper zookeeper:2181 --partitions 1 --replication-factor 1 --topic sensor-data'"
depends_on:
- zookeeper
elasticsearch:
hostname: elasticsearch
image: elasticsearch:7.6.1
ports:
- 9200:9200
volumes:
- ./elasticsearch/data:/elasticsearch/data
environment:
- cluster.name=elasticsearch
- node.name=es
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
- discovery.type=single-node
kibana:
hostname: kibana
image: kibana:7.6.1
ports:
- 5601:5601
environment:
SERVER_NAME: kibana
elasticsearch.url: http://elasticsearch:9200