-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.js
52 lines (50 loc) · 1.67 KB
/
config.js
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
'use strict';
const env = process.env.NODE_ENV;
const localhost = () => `${process.env.LISTEN_HOST || '0.0.0.0'}:${process.env.PORT || 8081}`;
module.exports = {
aws: {
sqs: process.env.AWS_SQS
},
reports: {
deletionTimeout: process.env.DELETION_TIMEOUT,
alertTimeout: process.env.FIRST_ALERT_TIMEOUT
},
audit: {
enabled: String(process.env.AUDIT_DATA) === 'true',
host: process.env.AUDIT_DB_HOST,
user: process.env.AUDIT_DB_USER,
password: process.env.AUDIT_DB_PASS,
database: process.env.AUDIT_DB_NAME
},
prometheusPort: 8082,
env,
allowSkip: String(process.env.ALLOW_SKIP) === 'true',
skipEmail: process.env.SKIP_EMAIL,
writeToCasework: process.env.WRITE_TO_CASEWORK || env !== 'local',
hostUrl: process.env.HOST_URL,
saveService: {
port: process.env.DATASERVICE_SERVICE_PORT_HTTPS,
host: process.env.DATASERVICE_SERVICE_HOST &&
`https://${process.env.DATASERVICE_SERVICE_HOST}` || 'http://127.0.0.1'
},
redis: {
port: process.env.REDIS_PORT,
host: process.env.REDIS_HOST
},
keycloak: {
token: process.env.KEYCLOAK_TOKEN_URL,
username: process.env.KEYCLOAK_USERNAME,
password: process.env.KEYCLOAK_PASSWORD,
clientId: process.env.KEYCLOAK_CLIENT_ID,
secret: process.env.KEYCLOAK_SECRET
},
tokenExpiry: 1800,
govukNotify: {
notifyApiKey: process.env.NOTIFY_STUB === 'true' ? 'USE_MOCK' : process.env.NOTIFY_KEY,
templateUserAuthId: process.env.TEMPLATE_USER_AUTHORISATION_ID,
templateFeedback: process.env.TEMPLATE_FEEDBACK,
caseworkerEmail: process.env.CASEWORKER_EMAIL,
feedbackEmail: process.env.FEEDBACK_EMAIL
},
promptSheet: 'nrm-form-offline-v3-15-05-2023.pdf'
};