-
Notifications
You must be signed in to change notification settings - Fork 32
/
docker-compose.yml
460 lines (442 loc) · 13.9 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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
version: "3.8"
services:
## External dependencies
gateway:
image: traefik:v2.0.7
container_name: traefik
logging: &logging
driver: "json-file"
options:
max-size: 100m
max-file: "5"
ports:
- "8080:8080" # ReportPortal UI
- "8081:8081" # Traefik dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
- --providers.docker=true
- --providers.docker.constraints=Label(`traefik.expose`, `true`)
- --entrypoints.web.address=:8080
- --entrypoints.traefik.address=:8081
- --api.dashboard=true
- --api.insecure=true
networks:
- reportportal
restart: always
opensearch:
image: opensearchproject/opensearch:2.11.0
container_name: opensearch
logging:
<<: *logging
environment:
discovery.type: single-node
plugins.security.disabled: "true"
bootstrap.memory_lock: "true"
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
DISABLE_INSTALL_DEMO_CONFIG: "true"
ulimits:
memlock:
soft: -1
hard: -1
## Expose OpenSearch
# ports:
# - "9200:9200"
# - "9600:9600"
volumes:
- opensearch:/usr/share/opensearch/data
healthcheck:
test: ["CMD", "curl","-s" ,"-f", "http://0.0.0.0:9200/_cat/health"]
networks:
- reportportal
postgres:
image: postgres:12.17-alpine3.17
container_name: postgres
logging:
<<: *logging
shm_size: '512m'
environment:
POSTGRES_USER: &db_user rpuser
POSTGRES_PASSWORD: &db_password rppass
POSTGRES_DB: &db_name reportportal
volumes:
- postgres:/var/lib/postgresql/data
## Expose Database
ports:
- "5432:5432"
command:
## PostgrsSQL performance tuning
## Ref: https://reportportal.io/docs/installation-steps/OptimalPerformanceHardwareSetup#5-postgresql-performance-tuning
-c checkpoint_completion_target=0.9
-c work_mem=96MB
-c wal_writer_delay=20ms
-c synchronous_commit=off
-c wal_buffers=32MB
-c min_wal_size=2GB
-c max_wal_size=4GB
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 10s
timeout: 120s
retries: 10
networks:
- reportportal
restart: always
rabbitmq:
image: bitnami/rabbitmq:3.12.2-debian-11-r8
container_name: rabbitmq
logging:
<<: *logging
## Expose RabbitMQ
# ports:
# - "5672:5672"
# - "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: &rabbitmq_user rabbitmq
RABBITMQ_DEFAULT_PASS: &rabbitmq_password rabbitmq
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 30s
timeout: 30s
retries: 5
networks:
- reportportal
restart: always
## ReportPortal services
index:
image: reportportal/service-index:5.12.0
container_name: reportportal-index
logging:
<<: *logging
depends_on:
gateway:
condition: service_started
environment:
LB_URL: http://gateway:8081
TRAEFIK_V2_MODE: 'true'
healthcheck:
test: wget -q --spider http://0.0.0.0:8080/health
interval: 30s
timeout: 30s
retries: 10
start_period: 10s
labels:
- "traefik.http.routers.index.rule=PathPrefix(`/`)"
- "traefik.http.routers.index.service=index"
- "traefik.http.services.index.loadbalancer.server.port=8080"
- "traefik.http.services.index.loadbalancer.server.scheme=http"
- "traefik.expose=true"
networks:
- reportportal
restart: always
ui:
image: reportportal/service-ui:5.12.0
container_name: reportportal-ui
environment:
RP_SERVER_PORT: "8080"
healthcheck:
test: wget -q --spider http://0.0.0.0:8080/health
interval: 30s
timeout: 30s
retries: 10
start_period: 10s
labels:
- "traefik.http.middlewares.ui-strip-prefix.stripprefix.prefixes=/ui"
- "traefik.http.routers.ui.middlewares=ui-strip-prefix@docker"
- "traefik.http.routers.ui.rule=PathPrefix(`/ui`)"
- "traefik.http.routers.ui.service=ui"
- "traefik.http.services.ui.loadbalancer.server.port=8080"
- "traefik.http.services.ui.loadbalancer.server.scheme=http"
- "traefik.expose=true"
networks:
- reportportal
restart: always
api:
image: reportportal/service-api:5.12.0
container_name: reportportal-api
logging:
<<: *logging
depends_on:
rabbitmq:
condition: service_healthy
gateway:
condition: service_started
postgres:
condition: service_healthy
environment:
## Double entry moves test logs from PostgreSQL to Elastic-type engines
## Ref: https://reportportal.io/blog/double-entry-in-5.7.2
## RP_ELASTICSEARCH_HOST: http://opensearch:9200
RP_DB_HOST: postgres
RP_DB_USER: *db_user
RP_DB_PASS: *db_password
RP_DB_NAME: *db_name
RP_AMQP_HOST: &rabbitmq_host rabbitmq
RP_AMQP_PORT: &rabbitmq_port 5672
RP_AMQP_USER: *rabbitmq_user
RP_AMQP_PASS: *rabbitmq_password
RP_AMQP_APIUSER: *rabbitmq_user
RP_AMQP_APIPASS: *rabbitmq_password
RP_AMQP_ANALYZER-VHOST: analyzer
DATASTORE_TYPE: filesystem
LOGGING_LEVEL_ORG_HIBERNATE_SQL: info
RP_REQUESTLOGGING: "false"
AUDIT_LOGGER: "OFF"
MANAGEMENT_HEALTH_ELASTICSEARCH_ENABLED: "false"
RP_ENVIRONMENT_VARIABLE_ALLOW_DELETE_ACCOUNT: "false"
JAVA_OPTS: >
-Xmx1g
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/tmp
-Dcom.sun.management.jmxremote.rmi.port=12349
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=0.0.0.0
RP_JOBS_BASEURL: http://jobs:8686
COM_TA_REPORTPORTAL_JOB_INTERRUPT_BROKEN_LAUNCHES_CRON: PT1H
RP_ENVIRONMENT_VARIABLE_PATTERN-ANALYSIS_BATCH-SIZE: 100
RP_ENVIRONMENT_VARIABLE_PATTERN-ANALYSIS_PREFETCH-COUNT: 1
RP_ENVIRONMENT_VARIABLE_PATTERN-ANALYSIS_CONSUMERS-COUNT: 1
volumes:
- storage:/data/storage
healthcheck:
test: curl -f http://0.0.0.0:8585/health
interval: 60s
timeout: 30s
retries: 10
start_period: 60s
labels:
- "traefik.http.middlewares.api-strip-prefix.stripprefix.prefixes=/api"
- "traefik.http.routers.api.middlewares=api-strip-prefix@docker"
- "traefik.http.routers.api.rule=PathPrefix(`/api`)"
- "traefik.http.routers.api.service=api"
- "traefik.http.services.api.loadbalancer.server.port=8585"
- "traefik.http.services.api.loadbalancer.server.scheme=http"
- "traefik.expose=true"
networks:
- reportportal
restart: always
uat:
build:
context: .
dockerfile: Dockerfile
logging:
<<: *logging
environment:
RP_DB_HOST: postgres
RP_DB_USER: *db_user
RP_DB_PASS: *db_password
RP_DB_NAME: *db_name
RP_AMQP_HOST: *rabbitmq_host
RP_AMQP_PORT: *rabbitmq_port
RP_AMQP_USER: *rabbitmq_user
RP_AMQP_PASS: *rabbitmq_password
RP_AMQP_APIUSER: *rabbitmq_user
RP_AMQP_APIPASS: *rabbitmq_password
DATASTORE_TYPE: filesystem
RP_SESSION_LIVE: 86400 # in seconds
RP_SAML_SESSION-LIVE: 4320
## RP_INITIAL_ADMIN_PASSWORD - the initial password of the superadmin user for the first launch. This value can't change the password on redeployments.
RP_INITIAL_ADMIN_PASSWORD: "erebus"
JAVA_OPTS: -Djava.security.egd=file:/dev/./urandom -XX:MinRAMPercentage=60.0 -XX:MaxRAMPercentage=90.0
volumes:
- storage:/data/storage
healthcheck:
test: curl -f http://0.0.0.0:9999/health
interval: 60s
timeout: 30s
retries: 10
start_period: 60s
labels:
- "traefik.http.middlewares.uat-strip-prefix.stripprefix.prefixes=/uat"
- "traefik.http.routers.uat.middlewares=uat-strip-prefix@docker"
- "traefik.http.routers.uat.rule=PathPrefix(`/uat`)"
- "traefik.http.routers.uat.service=uat"
- "traefik.http.services.uat.loadbalancer.server.port=9999"
- "traefik.http.services.uat.loadbalancer.server.scheme=http"
- "traefik.expose=true"
depends_on:
postgres:
condition: service_healthy
networks:
- reportportal
restart: always
jobs:
image: reportportal/service-jobs:5.12.0
container_name: reportportal-jobs
logging:
<<: *logging
depends_on:
rabbitmq:
condition: service_healthy
gateway:
condition: service_started
postgres:
condition: service_healthy
environment:
## Double entry moves test logs from PostgreSQL to Elastic-type engines
#№ Ref: https://reportportal.io/blog/double-entry-in-5.7.2
## RP_ELASTICSEARCH_HOST: http://opensearch:9200
## RP_ELASTICSEARCH_USERNAME: ""
## RP_ELASTICSEARCH_PASSWORD: ""
RP_DB_HOST: postgres
RP_DB_USER: *db_user
RP_DB_PASS: *db_password
RP_DB_NAME: *db_name
RP_AMQP_HOST: *rabbitmq_host
RP_AMQP_PORT: *rabbitmq_port
RP_AMQP_USER: *rabbitmq_user
RP_AMQP_PASS: *rabbitmq_password
RP_AMQP_APIUSER: *rabbitmq_user
RP_AMQP_APIPASS: *rabbitmq_password
RP_AMQP_ANALYZER-VHOST: analyzer
DATASTORE_TYPE: filesystem
RP_ENVIRONMENT_VARIABLE_CLEAN_ATTACHMENT_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_LOG_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_LAUNCH_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_STORAGE_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_STORAGE_PROJECT_CRON: 0 */5 * * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_EXPIREDUSER_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_EXPIREDUSER_RETENTIONPERIOD: 365
RP_ENVIRONMENT_VARIABLE_NOTIFICATION_EXPIREDUSER_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_EVENTS_RETENTIONPERIOD: 365
RP_ENVIRONMENT_VARIABLE_CLEAN_EVENTS_CRON: 0 30 05 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_STORAGE_CHUNKSIZE: 20000
RP_PROCESSING_LOG_MAXBATCHSIZE: 2000
RP_PROCESSING_LOG_MAXBATCHTIMEOUT: 6000
RP_AMQP_MAXLOGCONSUMER: 1
JAVA_OPTS: >
-Djava.security.egd=file:/dev/./urandom
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XX:G1ReservePercent=20
-XX:InitiatingHeapOccupancyPercent=60
-XX:MaxRAMPercentage=70.0
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/tmp
volumes:
- storage:/data/storage
healthcheck:
test: curl -f http://0.0.0.0:8686/health || exit 1
interval: 60s
timeout: 30s
retries: 10
start_period: 60s
labels:
- traefik.http.middlewares.jobs-strip-prefix.stripprefix.prefixes=/jobs
- traefik.http.routers.jobs.middlewares=jobs-strip-prefix@docker
- traefik.http.routers.jobs.rule=PathPrefix(`/jobs`)
- traefik.http.routers.jobs.service=jobs
- traefik.http.services.jobs.loadbalancer.server.port=8686
- traefik.http.services.jobs.loadbalancer.server.scheme=http
- traefik.expose=true
networks:
- reportportal
restart: always
analyzer:
image: &analyzer_img reportportal/service-auto-analyzer:5.12.0-r1
container_name: reportportal-analyzer
logging:
<<: *logging
environment:
LOGGING_LEVEL: info
AMQP_EXCHANGE_NAME: analyzer-default
AMQP_VIRTUAL_HOST: analyzer
AMQP_URL: amqp://rabbitmq:rabbitmq@rabbitmq:5672
# ES_USER:
# ES_PASSWORD:
ES_HOSTS: http://opensearch:9200
ANALYZER_BINARYSTORE_TYPE: filesystem
volumes:
- storage:/data/storage
depends_on:
opensearch:
condition: service_started
rabbitmq:
condition: service_healthy
networks:
- reportportal
restart: always
analyzer-train:
image: *analyzer_img
container_name: reportportal-analyzer-train
logging:
<<: *logging
environment:
LOGGING_LEVEL: info
AMQP_EXCHANGE_NAME: analyzer-default
AMQP_VIRTUAL_HOST: analyzer
AMQP_URL: amqp://rabbitmq:rabbitmq@rabbitmq:5672
# ES_USER:
# ES_PASSWORD:
ES_HOSTS: http://opensearch:9200
INSTANCE_TASK_TYPE: train
UWSGI_WORKERS: 1
ANALYZER_BINARYSTORE_TYPE: filesystem
volumes:
- storage:/data/storage
depends_on:
opensearch:
condition: service_started
rabbitmq:
condition: service_healthy
networks:
- reportportal
restart: always
metrics-gatherer:
image: reportportal/service-metrics-gatherer:5.12.0-r1
container_name: reportportal-metrics-gatherer
logging:
<<: *logging
environment:
LOGGING_LEVEL: info
# ES_USER:
# ES_PASSWORD:
ES_HOST: http://opensearch:9200
POSTGRES_USER: *db_user
POSTGRES_PASSWORD: *db_password
POSTGRES_DB: *db_name
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
ALLOWED_START_TIME: "22:00"
ALLOWED_END_TIME: "08:00"
# TZ: Europe/Minsk you can change a timezone like this to specify when metrics are gathered
AMQP_URL: amqp://rabbitmq:rabbitmq@rabbitmq:5672
AMQP_VIRTUAL_HOST: analyzer
depends_on:
opensearch:
condition: service_started
networks:
- reportportal
restart: always
migrations:
image: reportportal/migrations:5.12.0
container_name: reportportal-migrations
logging:
<<: *logging
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRES_SERVER: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: *db_name
POSTGRES_USER: *db_user
POSTGRES_PASSWORD: *db_password
OS_HOST: opensearch
OS_PORT: 9200
OS_PROTOCOL: http
# OS_USER:
# OS_PASSWORD:
networks:
- reportportal
restart: on-failure
volumes:
opensearch:
storage:
postgres:
networks:
reportportal: