-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
263 lines (249 loc) · 7.13 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
version: "3"
volumes:
db-data:
driver: local
grafana-data:
driver: local
loki-data:
driver: local
services:
timescaledb:
image: timescale/timescaledb:latest-pg11
restart: always
environment:
POSTGRES_DB: "smart_dep"
POSTGRES_USER: "admin"
POSTGRES_PASSWORD: "admin"
volumes:
# Set implicit place for using disk space where it is deployed (not system)
- db-data:/var/lib/postgresql/data
# - ./volumes/db-data:/var/lib/postgresql/data
ports:
- "5432:5432"
labels:
NAME: "timescaledb"
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
pgadmin:
image: dpage/pgadmin4:4.20
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "admin"
ports:
- "54321:80"
volumes:
- ./config/pgadmin/servers.json:/pgadmin4/servers.json:ro
depends_on:
- timescaledb
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
rabbitmq:
image: "rabbitmq:3-management"
restart: always
environment:
RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG"
ports:
- "15672:15672" # RabbitWebInterface
- "5672:5672" # AMQP
- "1883:1883" # MQTT
labels:
NAME: "rabbitmq"
volumes:
- ./config/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins:ro
- ./config/rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro
#- ./config/rabbitmq/autocluster-0.4.1.ez:/usr/lib/rabbitmq/lib/rabbitmq_server-3.5.5/plugins/autocluster-0.4.1.ez
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
web:
build:
context: web-frontend
image: acs-registry.duckdns.org/webui:${VERSION:-latest}
restart: always
# For debug
ports:
- "81:80"
depends_on:
- apiserver
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
apiserver:
build:
context: .
dockerfile: api_server/Dockerfile
image: acs-registry.duckdns.org/apiserver:${VERSION:-latest}
env_file:
- "config/.env.${SMART_ENV:-dev}"
environment:
- DMINUTES=5
# - RECREATE_TABLES=True
- PREPARE_RABBITMQ=True
restart: always
# For swagger access
ports:
- "5000:8080"
depends_on:
- timescaledb
- rabbitmq
command:
[
"gunicorn",
"-k=geventwebsocket.gunicorn.workers.GeventWebSocketWorker",
"--workers=1",
"-b=0.0.0.0:8080",
"app:app",
]
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
microserver:
build:
context: .
dockerfile: micro_server/Dockerfile
image: acs-registry.duckdns.org/microserver:${VERSION:-latest}
env_file:
- "config/.env.${SMART_ENV:-dev}"
restart: always
ports:
- "5001:8080"
depends_on:
- timescaledb
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
command:
["gunicorn", "--workers=1", "-b=0.0.0.0:8080", "wsgi:create_app()"]
emulator:
build:
context: emulator
image: acs-registry.duckdns.org/emulator:${VERSION:-latest}
restart: always
depends_on:
- rabbitmq
- microserver
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
state_tracker:
build:
context: .
dockerfile: tracker/Dockerfile
image: acs-registry.duckdns.org/tracker:${VERSION:-latest}
env_file:
- "config/.env.${SMART_ENV:-dev}"
environment:
- TYPE=state
- BUFFER_LIMIT=1000
- TIMEOUT_S=1.0
restart: always
hostname: state_tracker
depends_on:
- rabbitmq
- timescaledb
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
command_tracker:
build:
context: .
dockerfile: tracker/Dockerfile
image: acs-registry.duckdns.org/tracker:${VERSION:-latest}
env_file:
- "config/.env.${SMART_ENV:-dev}"
environment:
- TYPE=command
- BUFFER_LIMIT=1000
- TIMEOUT_S=1.0
restart: always
hostname: command_tracker
depends_on:
- rabbitmq
- timescaledb
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
config_tracker:
build:
context: .
dockerfile: tracker/Dockerfile
image: acs-registry.duckdns.org/tracker:${VERSION:-latest}
env_file:
- "config/.env.${SMART_ENV:-dev}"
environment:
- TYPE=config
- BUFFER_LIMIT=1000
- TIMEOUT_S=1.0
restart: always
hostname: config_tracker
depends_on:
- rabbitmq
- timescaledb
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
fluentd:
build:
context: .
dockerfile: ./fluentd/Dockerfile
image: acs-registry.duckdns.org/fluentd:${VERSION:-latest}
restart: always
ports:
- 24224:24224
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
loki:
image: grafana/loki:latest
restart: always
ports:
- 3100:3100
command: -config.file=/etc/loki/local-config.yaml
volumes:
- loki-data:/data/loki
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"
grafana:
image: grafana/grafana:6.7.3
restart: always
ports:
- 3000:3000
volumes:
- ./config/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./config/grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
- grafana-data:/var/lib/grafana
depends_on:
- loki
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "20m"