-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapplication.yml
More file actions
289 lines (258 loc) · 7.17 KB
/
application.yml
File metadata and controls
289 lines (258 loc) · 7.17 KB
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
server:
port: "${CAWS_PORT}"
max-http-request-header-size: 48KB
tomcat:
uri-encoding: UTF-8
servlet:
encoding:
charset: UTF-8
enabled: true
force: true
forward-headers-strategy: native
spring:
application:
name: carp-webservices
version: 1.2.0
servlet:
multipart:
enabled: true
max-file-size: 30MB
max-request-size: 30MB
output:
ansi:
enabled: always
datasource:
name: "carp_${PROFILE}"
url: "jdbc:postgresql://${PG_HOST}:${PG_PORT}/carp?serverTimezone=UTC&characterEncoding=utf-8"
username: "${ADMIN_USER}"
password: "${ADMIN_PASSWORD}"
driver-class-name: org.postgresql.Driver
# HikariCP settings
# https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby
type: com.zaxxer.hikari.HikariDataSource
hikari:
driver-class-name: org.postgresql.Driver
maximum-pool-size: 20
idle-timeout: 600000
max-lifetime: 1800000
minimum-idle: 5
connection-timeout: 30000
leak-detection-threshold: 30000
pool-name: CarpHikariCP
jpa:
properties:
hibernate:
types:
print:
banner: false
jdbc:
lob:
non_contextual_creation: true
generate-ddl: false
open-in-view: false
sql:
init:
mode: always
rabbitmq:
host: "${RABBIT_HOST}"
port: "${RABBIT_PORT}"
username: "${ADMIN_USER}"
password: "${ADMIN_PASSWORD}"
listener:
simple:
retry:
enabled: true
initial-interval: 1s
max-attempts: 3
max-interval: 10s
multiplier: 3
mail:
host: "${MAIL_HOST}"
port: "${MAIL_PORT}"
username: "${MAIL_USERNAME}"
password: "${MAIL_PASSWORD}"
from: "${MAIL_FROM} <${MAIL_FROM_ADDRESS}>"
properties:
mail.smtp.auth: ${MAIL_SMTP_AUTH:true}
mail.smtp.starttls.enable: ${MAIL_SMTP_STARTTLS_ENABLE:true}
mail.smtp.starttls.required: ${MAIL_SMTP_STARTTLS_REQUIRED:true}
mail.transport.protocol: smtp
mail.smtp.connectiontimeout: 60000
mail.smtp.timeout: 60000
mail.smtp.writetimeout: 60000
messages:
basename: messages/messages
encoding: UTF-8
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML
encoding: UTF-8
servlet:
content-type: text/html
cache: true
main:
banner-mode: off
flyway:
enabled: true
jackson:
default-property-inclusion: NON_NULL
keycloak:
auth-server-url: "${KC_URL}"
realm: Carp
admin:
client-id: "${KC_CLIENT_ID}"
client-secret: "${KC_CLIENT_SECRET}"
com:
c4-soft:
springaddons:
oidc:
resourceserver:
permit-all:
- /actuator/**
- /swagger-ui/**
- /v3/api-docs/**
- /doc/**
ops:
- iss: ${keycloak.auth-server-url}/realms/${keycloak.realm}
username-claim: preferred_username
authorities:
- path: $.realm_access.roles
prefix: ROLE_
caze: upper
- path: $.manage_study
prefix: manage_study_
- path: $.limited_manage_study
prefix: limited_manage_study_
- path: $.in_deployment
prefix: in_deployment_
- path: $.protocol_owner
prefix: protocol_owner_
- path: $.file_owner
prefix: file_owner_
- path: $.consent_owner
prefix: consent_owner_
- path: $.collection_owner
prefix: collection_owner_
springdoc:
api-docs:
path: /doc/v3/api-docs
swagger-ui:
path: /doc/
default-model-rendering: model
oauth:
client-id: "${KC_CLIENT_ID}"
client-secret: "${KC_CLIENT_SECRET}"
scopes: openid profile email carp
realm: ${keycloak.realm}
# TODO: Kotlin support is broken due to incompability between springdoc-openapi, spring-boot 3.5.x and kotlin 1.9.x,
# enable kotlin support once kotlin 2 is used
enable-kotlin: false
rabbit:
data-point:
processing:
queue: data-point-processing-${spring.profiles.active}
direct-ex: data-point-direct-${spring.profiles.active}
dlq: ${rabbit.data-point.processing.queue}.dlq
dlx: ${rabbit.data-point.processing.queue}.dlx
plq: ${rabbit.data-point.processing.queue}.plq
plx: ${rabbit.data-point.processing.queue}.plx
email:
sending:
queue: email-sending-queue-${spring.profiles.active}
direct-ex: email-sending-direct-exchange-${spring.profiles.active}
dlq: ${rabbit.email.sending.queue}.dlq
dlx: ${rabbit.email.sending.queue}.dlx
plq: ${rabbit.email.sending.queue}.plq
plx: ${rabbit.email.sending.queue}.plx
third-party:
processing:
queue: third-party-queue-${spring.profiles.active}
direct-ex: third-party-direct-exchange-${spring.profiles.active}
dlq: ${rabbit.third-party.processing.queue}.dlq
dlx: ${rabbit.third-party.processing.queue}.dlx
plq: ${rabbit.third-party.processing.queue}.plq
plx: ${rabbit.third-party.processing.queue}.plx
study:
queue: study-queue-${spring.profiles.active}
direct-ex: study-direct-exchange-${spring.profiles.active}
dlq: ${rabbit.study.queue}.dlq
dlx: ${rabbit.study.queue}.dlx
deployment:
queue: deployment-queue-${spring.profiles.active}
direct-ex: deployment-direct-exchange-${spring.profiles.active}
dlq: ${rabbit.deployment.queue}.dlq
dlx: ${rabbit.deployment.queue}.dlx
# s3 settings for image storage
# Future versions of CARP will ship with a self-hosted s3 container
s3:
space:
key: "${S3_KEY}"
secret: "${S3_SECRET}"
endpoint: "${S3_ENDPOINT}"
bucket: "${S3_BUCKET}"
region: "${S3_REGION}"
management:
endpoints:
web:
exposure:
include: ["health", "info", "prometheus", "metrics"]
endpoint:
health:
cache:
time-to-live: 5000
show-details: always
info:
build:
enabled: true
defaults:
enabled: true
env:
enabled: true
health:
defaults:
enabled: true
db:
enabled: true
diskspace:
enabled: true
logging:
level:
org.hibernate.sql: INFO
com.zaxxer.hikari.HikariConfig: INFO
org.hibernate.type.descriptor.sql.BasicBinder: INFO
org.keycloak: INFO
org.springframework.web: INFO
org.springframework.security: INFO
teams:
webhook:
server: "${TEAMS_SERVER_WEBHOOK_URL}"
client: "${TEAMS_CLIENT_WEBHOOK_URL}"
heartbeat: "${TEAMS_HEARTBEAT_WEBHOOK_URL}"
dev: "${TEAMS_DEV_WEBHOOK_URL}"
storage:
directory: /home/carp/storage/${spring.profiles.active}/
exports:
expiration:
enabled: true
days: 90
cleanup:
exports:
retention-days: "${EXPORTS_RETENTION_DAYS:7}"
environment:
url: "${CAWS_URL}"
portalUrl: "${CAWS_PORTAL_URL}"
keycloak-url: "${KC_URL}"
keycloak-realm: "${keycloak.realm}"
alert:
# The email address to send alerts to
admin-email: "${CAWS_ADMIN_EMAIL}"
subject: WARNING! DATABASE CONNECTION PROBLEMS!
info:
app:
name: ${spring.application.name}
description: This is CARP Webservices API.
version: ${spring.application.version}
java:
version: 17
environment: ${spring.profiles.active}