forked from buerokratt/Training-Module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
335 lines (319 loc) · 17.3 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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
version: "3.9"
services:
ruuter:
container_name: ruuter
image: ruuter
environment:
- application.cors.allowedOrigins=http://localhost:3001,http://localhost:3002
- application.internalRequests.allowedIPs=127.0.0.1
- application.httpCodesAllowList=200,201,202,204,400,401,403,500
- server.port=8080
- application.logging.displayRequestContent=true
- application.logging.displayResponseContent=true
- application.logging.printStackTrace=true
- application.internalRequests.disabled=true
volumes:
- ./DSL/Ruuter.private:/DSL
- ./constants.ini:/app/constants.ini
ports:
- 8080:8080
networks:
- bykstack
database:
container_name: database
image: postgres:14.1
environment:
- POSTGRES_USER=byk
- POSTGRES_PASSWORD=01234
- POSTGRES_DB=training_db
ports:
- 5432:5432
volumes:
- ./data:/var/lib/postgresql/data
networks:
- bykstack
resql:
container_name: resql
image: resql
depends_on:
- database
environment:
- sqlms.datasources.[0].name=training
# - sqlms.datasources.[0].jdbcUrl=jdbc:postgresql://database:5432/training_db # For Local Use
- sqlms.datasources.[0].jdbcUrl=jdbc:postgresql://171.22.247.13:5434/train_db
- sqlms.datasources.[0].username=byk
- sqlms.datasources.[0].password=01234
- logging.level.org.springframework.boot=INFO
- server.port=8082
ports:
- 8082:8082
volumes:
- ./DSL/Resql/training:/workspace/app/templates/training
networks:
- bykstack
resql_services:
container_name: resql-services
image: resql
depends_on:
- database
environment:
- sqlms.datasources.[0].name=services
# - sqlms.datasources.[0].jdbcUrl=jdbc:postgresql://database:5432/services_db # For Local Use
- sqlms.datasources.[0].jdbcUrl=jdbc:postgresql://171.22.247.13:5435/services_db
- sqlms.datasources.[0].username=byk
- sqlms.datasources.[0].password=01234
- logging.level.org.springframework.boot=INFO
- server.port=8087
ports:
- 8087:8087
volumes:
- ./DSL/Resql/services:/workspace/app/templates/services
networks:
- bykstack
resql_users:
container_name: resql-users
image: resql
depends_on:
- database
environment:
- server.port=8088
- sqlms.datasources.[0].name=users
# - sqlms.datasources.[0].jdbcUrl=jdbc:postgresql://database:5432/users_db # For Local Use
- sqlms.datasources.[0].jdbcUrl=jdbc:postgresql://171.22.247.13:5433/byk
- sqlms.datasources.[0].username=byk
- sqlms.datasources.[0].password=2nH09n6Gly
- logging.level.org.springframework.boot=INFO
ports:
- 8088:8088
volumes:
- ./DSL/Resql/users:/workspace/app/templates/users
networks:
- bykstack
dmapper:
container_name: dmapper
image: data-mapper
environment:
- PORT=3000
- CONTENT_FOLDER=/data
volumes:
- ./DSL:/data
- ./DSL/DMapper/hbs:/workspace/app/views/training
- ./DSL/DMapper/js:/workspace/app/js/training
- ./DSL/DMapper/locations:/rasa/locations
- ./DSL/CronManager:/DSL/CronManager
ports:
- 3000:3000
networks:
- bykstack
training_gui:
container_name: training_gui
# user: root # This root user is only for local development due to permissions
environment:
- PORT§=3001
- REACT_APP_API_URL=http://localhost:8080
- REACT_APP_RUUTER_API_URL=http://localhost:8080
- REACT_APP_RUUTER_PRIVATE_API_URL=http://localhost:8080
- REACT_APP_RUUTER_V2_ANALYTICS_API_URL=http://localhost:3002/training/api
- REACT_APP_BUEROKRATT_CHATBOT_URL=http://buerokratt-chat:8080
- REACT_APP_OPENSEARCH_DASHBOARD_URL=https://opensearch.org/
- REACT_APP_OPENDATAPORT_URL=https://avaandmedtest.eesti.ee
- REACT_APP_MENU_URL=https://admin.dev.buerokratt.ee
- REACT_APP_RUUTER_URL=http://localhost:8080
- REACT_APP_MENU_PATH=/chat/menu.json
- REACT_APP_APP_PORT=3001
- REACT_APP_LOCAL=true
- REACT_APP_BASE_API_PATH=/al
- REACT_APP_AUTH_BASE_URL=http://localhost:3002/training/api
- REACT_APP_CUSTOMER_SERVICE_LOGIN=http://localhost:3004/et/dev-auth
- REACT_APP_CONVERSATIONS_BASE_URL=http://localhost:8080/chat
- REACT_APP_TRAINING_BASE_URL=http://localhost:8080/training
- REACT_APP_ANALYTICS_BASE_URL=http://localhost:8080/analytics
- REACT_APP_SERVICES_BASE_URL=http://localhost:8080/services
- REACT_APP_SETTINGS_BASE_URL=http://localhost:8080/settings
- REACT_APP_MONITORING_BASE_URL=http://localhost:8080/monitoring
- REACT_APP_SERVICE_ID=training
- REACT_APP_BASE_URL=burokratt/
- REACT_APP_SERVICE_MODULE_GUI_BASE_URL=http://localhost:3006
- 111REACT_APP_API_BASEURL=http://proto.we.ee/
- 111REACT_APP_BASE_URL=http://proto.we.ee/burokratt/
- 111REACT_APP_MOCK_ENABLED=true
- REACT_APP_NODE_ENV=development
- 111REACT_APP_PORT=3001
- REACT_APP_PUBLIC_URL=http://proto.we.ee/
- REACT_APP_RUUTER_URL=http://localhost:8080/
- REACT_APP_NOTIFICATION_NODE_URL=http://localhost:4040
- REACT_APP_CSP=upgrade-insecure-requests; default-src 'self'; font-src 'self' data:; img-src 'self' data:; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; object-src 'none'; connect-src 'self' http://localhost:8080 http://localhost:8085 http://localhost:4040 https://admin.dev.buerokratt.ee/chat/menu.json;
- REACT_APP_ENABLE_HIDDEN_FEATURES=TRUE
- REACT_APP_MENU_JSON=[{"id":"conversations","label":{"et":"Vestlused","en":"Conversations"},"path":"/chat","children":[{"label":{"et":"Vastamata","en":"Unanswered"},"path":"/unanswered"},{"label":{"et":"Aktiivsed","en":"Active"},"path":"/active"},{"label":{"et":"Ajalugu","en":"History"},"path":"/history"}]},{"id":"training","label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Teemad","en":"Themes"},"path":"/training/intents"},{"label":{"et":"Avalikud teemad","en":"Public themes"},"path":"/training/common-intents"},{"label":{"et":"Teemade järeltreenimine","en":"Post training themes"},"path":"/training/intents-followup-training"},{"label":{"et":"Vastused","en":"Answers"},"path":"/training/responses"},{"label":{"et":"Kasutuslood","en":"User Stories"},"path":"/training/stories"},{"label":{"et":"Konfiguratsioon","en":"Configuration"},"path":"/training/configuration"},{"label":{"et":"Vormid","en":"Forms"},"path":"/training/forms"},{"label":{"et":"Mälukohad","en":"Slots"},"path":"/training/slots"},{"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"}]},{"label":{"et":"Ajaloolised vestlused","en":"Historical conversations"},"path":"/history","children":[{"label":{"et":"Ajalugu","en":"History"},"path":"/history/history"},{"label":{"et":"Pöördumised","en":"Appeals"},"path":"/history/appeal"}]},{"label":{"et":"Mudelipank ja analüütika","en":"Modelbank and analytics"},"path":"/analytics","children":[{"label":{"et":"Teemade ülevaade","en":"Overview of topics"},"path":"/analytics/overview"},{"label":{"et":"Mudelite võrdlus","en":"Comparison of models"},"path":"/analytics/models"},{"label":{"et":"Testlood","en":"testTracks"},"path":"/analytics/testcases"}]},{"label":{"et":"Treeni uus mudel","en":"Train new model"},"path":"/train-new-model"}]},{"id":"analytics","label":{"et":"Analüütika","en":"Analytics"},"path":"/analytics","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Vestlused","en":"Chats"},"path":"/chats"},{"label":{"et":"Bürokratt","en":"Burokratt"},"path":"/burokratt"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/feedback"},{"label":{"et":"Nõustajad","en":"Advisors"},"path":"/advisors"},{"label":{"et":"Avaandmed","en":"Reports"},"path":"/reports"}]},{"id":"services","label":{"et":"Teenused","en":"Services"},"path":"/services","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Uus teenus","en":"New Service"},"path":"/newService"},{"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"},{"label":{"et":"Probleemsed teenused","en":"Faulty Services"},"path":"/faultyServices"}]},{"id":"settings","label":{"et":"Haldus","en":"Administration"},"path":"/settings","children":[{"label":{"et":"Kasutajad","en":"Users"},"path":"/users"},{"label":{"et":"Vestlusbot","en":"Chatbot"},"path":"/chatbot","children":[{"label":{"et":"Seaded","en":"Settings"},"path":"/chatbot/settings"},{"label":{"et":"Tervitussõnum","en":"Welcome message"},"path":"/chatbot/welcome-message"},{"label":{"et":"Välimus ja käitumine","en":"Appearance and behavior"},"path":"/chatbot/appearance"},{"label":{"et":"Erakorralised teated","en":"Emergency notices"},"path":"/chatbot/emergency-notices"}]},{"label":{"et":"Asutuse tööaeg","en":"Office opening hours"},"path":"/working-time"},{"label":{"et":"Sessiooni pikkus","en":"Session length"},"path":"/session-length"}]},{"id":"monitoring","label":{"et":"Seire","en":"Monitoring"},"path":"/monitoring","children":[{"label":{"et":"Aktiivaeg","en":"Working hours"},"path":"/uptime"}]}]
# # for production use this one:
# - REACT_APP_MENU_JSON=[{"id":"conversations","label":{"et":"Vestlused","en":"Conversations"},"path":"/chat","children":[{"label":{"et":"Vastamata","en":"Unanswered"},"path":"/unanswered"},{"label":{"et":"Aktiivsed","en":"Active"},"path":"/active"},{"label":{"et":"Ootel","en":"Pending"},"path":"/pending"},{"label":{"et":"Ajalugu","en":"History"},"path":"/history"}]},{"id":"training","label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Teemad","en":"Themes"},"path":"/training/intents"},{"hidden":true,"label":{"et":"Avalikud teemad","en":"Public themes"},"path":"/training/common-intents"},{"label":{"et":"Teemade järeltreenimine","en":"Post training themes"},"path":"/training/intents-followup-training"},{"label":{"et":"Vastused","en":"Answers"},"path":"/training/responses"},{"label":{"et":"Kasutuslood","en":"User Stories"},"path":"/training/stories"},{"hidden":true,"label":{"et":"Konfiguratsioon","en":"Configuration"},"path":"/training/configuration"},{"label":{"et":"Vormid","en":"Forms"},"path":"/training/forms"},{"label":{"et":"Mälukohad","en":"Slots"},"path":"/training/slots"},{"hidden":true,"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"}]},{"label":{"et":"Ajaloolised vestlused","en":"Historical conversations"},"path":"/history","children":[{"label":{"et":"Ajalugu","en":"History"},"path":"/history/history"},{"hidden":true,"label":{"et":"Pöördumised","en":"Appeals"},"path":"/history/appeal"}]},{"label":{"et":"Mudelipank ja analüütika","en":"Modelbank and analytics"},"path":"/analytics","children":[{"label":{"et":"Teemade ülevaade","en":"Overview of topics"},"path":"/analytics/overview"},{"label":{"et":"Mudelite võrdlus","en":"Comparison of models"},"path":"/analytics/models"},{"hidden":true,"label":{"et":"Testlood","en":"testTracks"},"path":"/analytics/testcases"}]},{"label":{"et":"Treeni uus mudel","en":"Train new model"},"path":"/train-new-model"}]},{"id":"analytics","label":{"et":"Analüütika","en":"Analytics"},"path":"/analytics","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Vestlused","en":"Chats"},"path":"/chats"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/feedback"},{"label":{"et":"Nõustajad","en":"Advisors"},"path":"/advisors"},{"label":{"et":"Avaandmed","en":"Reports"},"path":"/reports"}]},{"id":"services","hidden":true,"label":{"et":"Teenused","en":"Services"},"path":"/services","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Uus teenus","en":"New Service"},"path":"/newService"},{"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"},{"label":{"et":"Probleemsed teenused","en":"Faulty Services"},"path":"/faultyServices"}]},{"id":"settings","label":{"et":"Haldus","en":"Administration"},"path":"/settings","children":[{"label":{"et":"Kasutajad","en":"Users"},"path":"/users"},{"label":{"et":"Vestlusbot","en":"Chatbot"},"path":"/chatbot","children":[{"label":{"et":"Seaded","en":"Settings"},"path":"/chatbot/settings"},{"label":{"et":"Tervitussõnum","en":"Welcome message"},"path":"/chatbot/welcome-message"},{"label":{"et":"Välimus ja käitumine","en":"Appearance and behavior"},"path":"/chatbot/appearance"},{"label":{"et":"Erakorralised teated","en":"Emergency notices"},"path":"/chatbot/emergency-notices"}]},{"label":{"et":"Asutuse tööaeg","en":"Office opening hours"},"path":"/working-time"},{"label":{"et":"Sessiooni pikkus","en":"Session length"},"path":"/session-length"}]},{"id":"monitoring","hidden":true,"label":{"et":"Seire","en":"Monitoring"},"path":"/monitoring","children":[{"label":{"et":"Aktiivaeg","en":"Working hours"},"path":"/uptime"}]}]
build:
context: ./GUI
dockerfile: Dockerfile.dev
ports:
- 3001:3001
volumes:
- /app/node_modules
- ./GUI:/app
networks:
- bykstack
tim:
container_name: tim
image: tim
depends_on:
- tim-postgresql
environment:
- SECURITY_ALLOWLIST_JWT=resql,tim,tim-postgresql,ruuter,data_mapper,training_gui,127.0.0.1,::1
ports:
- 8085:8085
networks:
- bykstack
extra_hosts:
- "host.docker.internal:host-gateway"
cpus: "0.5" #(Example CPU limit)
mem_limit: "512M" #(Example memory limit)
tim-postgresql:
container_name: tim-postgresql
image: postgres:14.1
environment:
- POSTGRES_USER=tim
- POSTGRES_PASSWORD=123
- POSTGRES_DB=tim
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./tim-db:/var/lib/postgresql/data
ports:
- 9876:5432
networks:
- bykstack
pipelines:
container_name: pipelines
build:
context: ./DSL/Pipelines
environment:
- OPENSEARCH_PROTOCOL=http
- PORT=3010
- OPENSEARCH_HOST=opensearch
- OPENSEARCH_PORT=9200
- OPENSEARCH_AUTH=admin:admin
ports:
- 3010:3010
networks:
- bykstack
cron-manager:
container_name: cron-manager
image: cron-manager
# user: root # This root user is only for local development due to multi container mounted volume permissions
volumes:
- rasa-training-data:/data
- ./DSL/CronManager:/DSL
environment:
- server.port=9010
ports:
- 9010:9010
networks:
- bykstack
opensearch:
image: opensearchproject/opensearch:2.11.1
container_name: opensearch
environment:
- node.name=opensearch
- discovery.seed_hosts=opensearch
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- plugins.security.disabled=true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600
networks:
- bykstack
rasa:
image: rasa
container_name: rasa
# user: root # This root user is only for local development due to multi container mounted volume permissions
volumes:
- rasa-training-data:/app/models
environment:
- SQLALCHEMY_WARN_20=1
command: ["run", "--enable-api"]
ports:
- 5005:5005
networks:
- bykstack
s3-ferry:
container_name: s3-ferry
image: s3-ferry
# user: root # This root user is only for local development due to multi container mounted volume permissions
volumes:
- rasa-training-data:/api/data
environment:
- API_CORS_ORIGIN=*
- API_DOCUMENTATION_ENABLED=true
- S3_REGION=us-east-1
- S3_ENDPOINT_URL=http://localstack:4566
- S3_ACCESS_KEY_ID=accessKey
- S3_SECRET_ACCESS_KEY=secretKey
- S3_DATA_BUCKET_NAME=buerokratt
- S3_DATA_BUCKET_PATH=
- FS_DATA_DIRECTORY_PATH=./data
ports:
- 3005:3000
networks:
- bykstack
localstack:
container_name: localstack
image: localstack/localstack:3.3.0
ports:
- 4566:4566
environment:
- SERVICES=s3:4566
volumes:
- ./localstack-init.sh:/etc/localstack/init/ready.d/init.sh
networks:
- bykstack
notifications-node:
container_name: notifications-node
build:
context: ./notification-server
dockerfile: Dockerfile
# user: root # This root user is only for local development due to multi container mounted volume permissions
ports:
- 4040:4040
depends_on:
- opensearch
environment:
OPENSEARCH_PROTOCOL: http
OPENSEARCH_HOST: opensearch
OPENSEARCH_PORT: 9200
OPENSEARCH_USERNAME: admin
OPENSEARCH_PASSWORD: admin
PORT: 4040
REFRESH_INTERVAL: 1000
QUEUE_REFRESH_INTERVAL: 4000
CORS_WHITELIST_ORIGINS: http://localhost:3001,http://localhost:8080
RUUTER_URL: http://ruuter:8080
CHAT_TERMINATION_DELAY: 5000
volumes:
- /app/node_modules
- ./notification-server:/app
networks:
- bykstack
volumes:
opensearch-data:
rasa-training-data:
networks:
bykstack:
name: bykstack
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1400