-
Notifications
You must be signed in to change notification settings - Fork 7
/
EnvVariables.kt
192 lines (164 loc) · 4.02 KB
/
EnvVariables.kt
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
package blue.mild.covid.vaxx.setup
enum class EnvVariables {
/**
* Where the application version is stored.
* Set during the Docker Image built.
*/
RELEASE_FILE_PATH,
/**
* Connection properties for the database.
*/
POSTGRES_DB,
POSTGRES_HOST,
POSTGRES_USER,
POSTGRES_PASSWORD,
/**
* Isin configuration
*/
ISIN_ROOT_URL,
ISIN_PRACOVNIK_NRZP_CISLO,
ISIN_PRACOVNIK_PCZ,
ISIN_CERT_BASE64,
ISIN_CERT_PASSWORD,
ISIN_STORE_TYPE,
ISIN_OCKOVACI_LATKA_KOD,
ISIN_INDIKACE_JINA,
// TODO certificate password decryption
// KMS_KEY_ID,
/**
* If the MailJet email should be enabled.
* If so, other envs need to specified as well.
*/
ENABLE_MAIL_SERVICE,
MAIL_JET_API_SECRET,
MAIL_JET_API_KEY,
MAIL_ADDRESS_FROM,
MAIL_FROM,
MAIL_SUBJECT,
/**
* From which path should backend serve static
* frontend files. Set during Docker Image build.
*/
FRONTEND_PATH,
/**
* What secret should be used for signing JWTs.
* By default the application generates random string.
*
* This should be set to some value in production.
*/
JWT_SIGNING_SECRET,
/**
* Time duration for how long should be JWTs valid in minutes.
*/
JWT_EXPIRATION_IN_MINUTES,
/**
* Whether to enable rate limiting or not.
* By default the rate limiting is enabled.
*/
ENABLE_RATE_LIMITING,
/**
* Number of requests per [RATE_LIMIT_DURATION_MINUTES] that
* should be allowed per host.
*/
RATE_LIMIT,
/**
* Specifies period for [RATE_LIMIT] in minutes.
*/
RATE_LIMIT_DURATION_MINUTES,
/**
* If swagger should be enabled or not. By default it is enabled,
* but should be disabled in the production.
*/
ENABLE_SWAGGER,
/**
* If the CORS should be allowed or not.
* By default they're enabled for http://localhost:4200.
*
* Disable for production use.
*/
ENABLE_CORS,
/**
* If the CSP headers should be allowed or not.
* By default, they're enabled.
*/
ENABLE_CSP,
/**
* Allowed origins if [ENABLE_CORS] is enabled separated by ','.
*
* Example:
* http://localhost:4200,https://covid-vaxx.stg.mild.blue
*/
CORS_ALLOWED_HOSTS,
/**
* On which port should start server listening.
* By default it is 8080.
*/
PORT,
/**
* Enables production logging to JSON.
*
* Default false. Should be enabled on prod.
*/
PRODUCTION_LOGGING,
/**
* Sets global log level - to all classes that are not
* from the blue.mild package.
*
* Default INFO.
*/
GLOBAL_LOG_LEVEL,
/**
* Log level for blue.mild package.
*
* Default TRACE.
*/
LOG_LEVEL,
/**
* If the application should store logs in the file.
*
* Default false.
*/
ENABLE_FILE_LOG,
/**
* Where to store the logs.
*
* Example: /var/logs/mildblue
* Default: current runtime directory
*/
FILE_FOLDER_LOG_PATH,
/**
* If the backend should require captcha verification during
* saving the patients registration.
*/
ENABLE_RECAPTCHA_VERIFICATION,
/**
* Secret key from Google Captcha.
*/
RECAPTCHA_SECRET_KEY,
/**
* Use ISIN to validate patients data.
*/
ENABLE_ISIN_PATIENT_VALIDATION,
/**
* Use ISIN to validate and register patients and register vaccinations.
*/
ENABLE_ISIN_CLIENT,
/**
* Enable cron job [blue.mild.covid.vaxx.jobs.EmailRetryJob].
*
* By default are all jobs disabled.
*/
ENABLE_PERIODIC_EMAIL_RETRY,
/**
* Enable cron job [blue.mild.covid.vaxx.jobs.IsinRetryJob].
*
* By default are all jobs disabled.
*/
ENABLE_PERIODIC_ISIN_SYNC,
/**
* Sets period of ISIN periodic synchronization in milliseconds
*
* By default 1 hour (3,600,000 millis) is used
*/
ISIN_SYNC_PERIOD
}