-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose-perf.yml
308 lines (296 loc) · 8.02 KB
/
docker-compose-perf.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
version: "3.7"
networks:
mojaloop-net:
name: mojaloop-net
services:
account-lookup-service:
image: mojaloop/account-lookup-service:${ACCOUNT_LOOKUP_SERVICE_VERSION}
env_file:
- .env
- perf.env
scale: 1
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/account-lookup-service.js /opt/app/config/default.json && /opt/app/wait4/wait4.js account-lookup-service && npm run migrate && node src/index.js server"
#ports:
# - "4001:4001"
# - "4002:4002"
environment:
- LOG_LEVEL=info
## Added for Test Scenario 5
# - LOG_LEVEL=error
## Added for Test Scenario 5
# - EVENT_SDK_ASYNC_OVERRIDE_EVENTS=""
# - EVENT_SDK_ASYNC_OVERRIDE_EVENTS=log,audit,trace
## Added for Test Scenario 5
# - EVENT_SDK_LOG_FILTER=""
- ALS_DISPLAY_ROUTES=false
- ALS_SWITCH_ENDPOINT=http://callback-handler-svc-cl-sim:3001/admin
- WAIT4_CONFIG=./wait4.config.perf-als.js
- EVENT_SDK_TRACEID_PER_VENDOR=false
## Added for Test Scenario 7
- UV_THREADPOOL_SIZE=16
- NODE_CACHE_ENABLED=true
networks:
- mojaloop-net
depends_on:
mysql-als:
condition: service_started
volumes:
- ./docker/wait4:/opt/app/wait4
- ./docker/config-modifier:/opt/app/config-modifier
healthcheck:
test: wget -q http://localhost:4001/health -O /dev/null || exit 1
timeout: 20s
retries: 10
start_period: 40s
interval: 30s
user: root
profiles:
- account-lookup-service
- discovery
- all-services
mysql-als:
image: mysql/mysql-server
env_file:
- .env
- perf.env
container_name: mysql-als
ports:
- "3307:3306"
volumes:
- ./docker/sql-als-init/:/docker-entrypoint-initdb.d/
environment:
- MYSQL_USER=${DBUSER:-account_lookup}
- MYSQL_PASSWORD=${DBPASS:-password}
- MYSQL_DATABASE=${DBUSER:-account_lookup}
- MYSQL_ALLOW_EMPTY_PASSWORD=true
networks:
- mojaloop-net
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "mysql-als"]
timeout: 20s
retries: 10
start_period: 40s
interval: 30s
profiles:
- account-lookup-service
- discovery
- all-services
## In memory storage - Ref: https://docs.docker.com/storage/tmpfs/
tmpfs:
- /var/lib/mysql
## Testing Toolkit
mojaloop-testing-toolkit:
image: mojaloop/ml-testing-toolkit:v16.1.1
env_file:
- .env
- perf.env
volumes:
- "./docker/ml-testing-toolkit/spec_files:/opt/app/spec_files"
- "./docker/ml-testing-toolkit/test-cases:/opt/app/examples"
ports:
- "4040:4040"
- "5050:5050"
user: root
command:
- sh
- -c
- "npm start"
networks:
- mojaloop-net
healthcheck:
test: ["CMD-SHELL", "nc -z -v localhost 4040"]
interval: 5s
timeout: 10s
start_period: 10s
retries: 10
profiles:
- testing-toolkit
- all-services
mojaloop-testing-toolkit-ui:
image: mojaloop/ml-testing-toolkit-ui:v15.3.0
env_file:
- .env
- perf.env
ports:
- "6060:6060"
environment:
# - API_BASE_URL=http://localhost:5050
- AUTH_ENABLED=FALSE
command:
- sh
- /usr/share/nginx/start.sh
networks:
- mojaloop-net
profiles:
- testing-toolkit
- all-services
ttk-provisioning:
image: mojaloop/ml-testing-toolkit-client-lib:v1.2.0
env_file:
- .env
- perf.env
volumes:
- "./docker/ml-testing-toolkit/test-cases/collections:/opt/app/collections"
- "./docker/ml-testing-toolkit/test-cases/environments:/opt/app/environments"
- "./reports:/opt/app/reports"
depends_on:
mojaloop-testing-toolkit:
condition: service_healthy
account-lookup-service:
condition: service_healthy
networks:
- mojaloop-net
command:
- sh
- -c
- "npm run cli -- -u http://mojaloop-testing-toolkit:5050 -l 2 -i collections/provisioning-perf-als -e environments/default-env.json --save-report --report-format html --report-target file://reports/ttk-provisioning-report.html"
user: root
profiles:
- ttk-provisioning
## Generic Callback Handler Service
# callback-handler-svc:
# # scale: 1
# scale: 4
# image: mojaloop/callback-handler-svc:local
# env_file:
# - .env
# - perf.env
# build:
# context: ./packages/callback-handler-svc
# cache_from:
# - mojaloop/callback-handler-svc:local
# # ports:
# # - "3001:3001"
# networks:
# - mojaloop-net
# volumes:
# - ./packages/callback-handler-svc/config:/opt/app/config
# - ./packages/callback-handler-svc/handlers:/opt/app/handlers
# environment:
# - LOG_LEVEL=info
# healthcheck:
# test: wget -q http://localhost:3001/health -O /dev/null || exit 1
# timeout: 20s
# retries: 30
# interval: 15s
# user: root
# profiles:
# - simulators
# - callback-handler
# - all-services
callback-handler-svc-payee-sim:
scale: 1
image: mojaloop/callback-handler-svc:local
env_file:
- .env
- perf.env
build:
context: ./packages/callback-handler-svc
cache_from:
- mojaloop/callback-handler-svc:local
# ports:
# - "3001:3001"
networks:
- mojaloop-net
volumes:
- ./packages/callback-handler-svc/config:/opt/app/config
- ./packages/callback-handler-svc/handlers:/opt/app/handlers
environment:
- LOG_LEVEL=info
healthcheck:
test: wget -q http://localhost:3001/health -O /dev/null || exit 1
timeout: 20s
retries: 30
interval: 15s
user: root
profiles:
- simulators
- callback-handler
- all-services
callback-handler-svc-oracle-sim:
scale: 1
image: mojaloop/callback-handler-svc:local
env_file:
- .env
- perf.env
build:
context: ./packages/callback-handler-svc
cache_from:
- mojaloop/callback-handler-svc:local
# ports:
# - "3001:3001"
networks:
- mojaloop-net
volumes:
- ./packages/callback-handler-svc/config:/opt/app/config
- ./packages/callback-handler-svc/handlers:/opt/app/handlers
environment:
- LOG_LEVEL=info
healthcheck:
test: wget -q http://localhost:3001/health -O /dev/null || exit 1
timeout: 20s
retries: 30
interval: 15s
user: root
profiles:
- simulators
- callback-handler
- all-services
callback-handler-svc-cl-sim:
scale: 1
image: mojaloop/callback-handler-svc:local
env_file:
- .env
- perf.env
build:
context: ./packages/callback-handler-svc
cache_from:
- mojaloop/callback-handler-svc:local
# ports:
# - "3001:3001"
networks:
- mojaloop-net
volumes:
- ./packages/callback-handler-svc/config:/opt/app/config
- ./packages/callback-handler-svc/handlers:/opt/app/handlers
environment:
- LOG_LEVEL=info
healthcheck:
test: wget -q http://localhost:3001/health -O /dev/null || exit 1
timeout: 20s
retries: 30
interval: 15s
user: root
profiles:
- simulators
- callback-handler
- all-services
callback-handler-svc-payer-sim:
scale: 1
image: mojaloop/callback-handler-svc:local
env_file:
- .env
- perf.env
build:
context: ./packages/callback-handler-svc
cache_from:
- mojaloop/callback-handler-svc:local
# ports:
# - "3001:3001"
networks:
- mojaloop-net
volumes:
- ./packages/callback-handler-svc/config:/opt/app/config
- ./packages/callback-handler-svc/handlers:/opt/app/handlers
environment:
- LOG_LEVEL=info
healthcheck:
test: wget -q http://localhost:3001/health -O /dev/null || exit 1
timeout: 20s
retries: 30
interval: 15s
user: root
profiles:
- simulators
- callback-handler
- all-services