forked from buerokratt/Service-Module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
221 lines (210 loc) · 14.1 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
version: "3.9"
services:
ruuter:
container_name: ruuter
image: ruuter
environment:
- application.cors.allowedOrigins=http://localhost:3006,http://localhost:3001,http://localhost:8086
- application.httpCodesAllowList=200,201,202,203,204,205,206,207,208,226
- application.logging.displayRequestContent=true
- application.logging.displayResponseContent=true
- server.port=8086
- application.DSL.processedFiletypes=.yml,.yaml,.tmp
- application.openSearchConfiguration.url=http://host.docker.internal:9200
- application.openSearchConfiguration.index=ruuterlog
- application.logging.printStackTrace=true
- application.internalRequests.disabled=true
- application.internalRequests.allowedIPs=127.0.0.1
volumes:
- ./DSL/Ruuter:/DSL
- ./constants.ini:/app/constants.ini
ports:
- 8086:8086
networks:
- bykstack
database:
container_name: database
image: postgres:14.1
environment:
- POSTGRES_USER=byk
- POSTGRES_PASSWORD=01234
- POSTGRES_MULTIPLE_DATABASES=users_db,services_db,training_db
ports:
- 5433:5432
volumes:
- ./data:/var/lib/postgresql/data
- ./init-databases.sh:/docker-entrypoint-initdb.d/init-databases.sh
networks:
- bykstack
resql:
container_name: resql
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
resql_training:
container_name: resql-training
image: resql
depends_on:
- database
environment:
- server.port=8089
- 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
ports:
- 8089:8089
volumes:
- ./DSL/Resql/training:/workspace/app/templates/training
networks:
- bykstack
data-mapper:
container_name: data-mapper
image: data-mapper
environment:
- PORT=3005
- CONTENT_FOLDER=/data
volumes:
- ./DSL:/data
- ./DSL/DMapper/hbs:/workspace/app/views/services
- ./DSL/DMapper/js:/workspace/app/js/services
- ./secrets:/data/secrets
ports:
- 3005:3005
networks:
- bykstack
gui_dev:
container_name: gui_dev
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true
- REACT_APP_API_URL=http://localhost:8086
- REACT_APP_TRAINING_MODULE_GUI_BASE_URL=http://localhost:3001
- PORT=3006
- REACT_APP_APP_PORT=3006
- REACT_APP_MENU_BASE_URL=http://localhost:8086
- REACT_APP_MENU_URL=https://admin.dev.buerokratt.ee
- REACT_APP_RUUTER_V2_SERVICE_API_URL=http://localhost:8086
- REACT_APP_AUTH_BASE_URL=http://localhost:8086
- REACT_APP_AUTH_PATH=/auth
- REACT_APP_MENU_PATH=/chat/menu.json
- REACT_APP_API_PATH=/
- REACT_APP_LOCAL=true
- REACT_APP_RUUTER_API_URL=http://localhost:8086
- REACT_APP_RUUTER_PRIVATE_API_URL=http://localhost:8086
- 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:8086 http://localhost:8085 https://admin.dev.buerokratt.ee/chat/menu.json;
- 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=services
- 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:
- 3006:3006
volumes: # Comment the volumes if you want to use this in production
- /app/node_modules
- ./GUI:/app
networks:
- bykstack
tim:
container_name: tim
image: tim
depends_on:
- tim-postgresql
environment:
- SECURITY_ALLOWLIST_JWT=ruuter,resql,resql_users,tim,tim-postgresql,node_server,data_mapper,gui_dev,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
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-data1:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600
networks:
- bykstack
volumes:
opensearch-data1:
networks:
bykstack:
name: bykstack
driver: bridge