-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.js
120 lines (115 loc) · 5.21 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
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
/**
* Map the .env value correctly to all env values per server, this will be added to every startup command by app.js
*
*/
require('dotenv').config();
exports.frontendConfig = {
PORT: process.env.FRONTEND_PORT,
DB_HOST: process.env.FRONTEND_MONGO_DB_HOST,
DB_PORT: process.env.FRONTEND_MONGO_PORT,
MONGO_DB_HOST: process.env.FRONTEND_MONGO_DB_HOST,
APOS_ALWAYS_COPY_ASSETS: '1',
APOS_WORKFLOW: process.env.FRONTEND_APOS_WORKFLOW,
DEFAULT_DB: process.env.FRONTEND_DEFAULT_MONGO_DB,
IMAGE_API_URL: process.env.IMAGE_APP_URL,
IMAGE_API_ACCESS_TOKEN: process.env.IMAGE_API_ACCESS_TOKEN,
INTERNAL_API_URL: process.env.FRONTEND_INTERNAL_API_URL,
API: process.env.FRONTEND_API_URL,
SESSION_SECRET: process.env.SESSION_SECRET,
SITE_API_KEY: process.env.FRONTEND_SITE_API_KEY,
APOS_WORKFLOW: process.env.FRONTEND_APOS_WORKFLOW,
LOGIN_CSM_BASIC_AUTH_USER: process.env.FRONTEND_LOGIN_CSM_BASIC_AUTH_USER,
LOGIN_CSM_BASIC_AUTH_PASSWORD: process.env.FRONTEND_LOGIN_CSM_BASIC_AUTH_PASSWORD,
MINIFY_JS: process.env.FRONTEND_MINIFY_JS,
COOKIE_SECURE_OFF: process.env.COOKIE_SECURE_OFF
}
exports.apiConfig = {
NODE_ENV: "development",
ADMIN_URL: process.env.ADMIN_URL,
API_URL: process.env.API_URL,
API_HOSTNAME: process.env.API_HOSTNAME,
API_DATABASE_USER: "root",
API_DATABASE_PASSWORD: process.env.MYSQL_PASSWORD,
API_DATABASE_DATABASE: process.env.API_DATABASE,
API_DATABASE_HOST: process.env.MYSQL_HOST,
API_EMAILADDRESS: process.env.API_EMAILADDRESS,
API_EXPRESS_PORT: process.env.API_PORT,
API_MAIL_FROM: process.env.API_MAIL_FROM,
API_MAIL_TRANSPORT_SMTP_PORT: process.env.MAIL_TRANSPORT_SMTP_PORT,
API_MAIL_TRANSPORT_SMTP_HOST: process.env.MAIL_TRANSPORT_SMTP_HOST,
API_MAIL_TRANSPORT_SMTP_REQUIRESSL: process.env.MAIL_TRANSPORT_SMTP_REQUIRESSL,
API_MAIL_TRANSPORT_SMTP_AUTH_USER: process.env.MAIL_TRANSPORT_SMTP_AUTH_USER,
API_MAIL_TRANSPORT_SMTP_AUTH_PASS: process.env.MAIL_TRANSPORT_SMTP_AUTH_PASS,
API_NOTIFICATIONS_ADMIN_EMAILADDRESS: process.env.API_NOTIFICATIONS_ADMIN_EMAILADDRESS,
API_SECURITY_SESSIONS_COOKIENAME: process.env.API_SECURITY_SESSIONS_COOKIENAME,
API_SECURITY_SESSIONS_ONLYSECURE: process.env.API_SECURITY_SESSIONS_ONLYSECURE,
API_AUTHORIZATION_JWTSECRET: process.env.API_AUTHORIZATION_JWTSECRET,
API_AUTHORIZATION_FIXEDAUTHTOKENS: process.env.API_AUTHORIZATION_FIXEDAUTHTOKENS,
FRONTEND_URL: process.env.FRONTEND_URL,
AUTH_URL: process.env.AUTH_APP_URL,
AUTH_INTERNAL_SERVER_URL: process.env.AUTH_INTERNAL_SERVER_URL,
AUTH_FIRST_CLIENT_ID: process.env.AUTH_FIRST_CLIENT_ID,
AUTH_FIRST_CLIENT_SECRET: process.env.AUTH_FIRST_CLIENT_SECRET,
AUTH_FIRST_CLIENT_LOGIN_CODE: process.env.AUTH_FIRST_CLIENT_LOGIN_CODE,
MYSQL_ST_GEO_MODE: process.env.MYSQL_ST_GEO_MODE,
AUTH_ADMIN_CLIENT_ID: process.env.AUTH_ADMIN_CLIENT_ID,
AUTH_ADMIN_CLIENT_SECRET: process.env.AUTH_ADMIN_CLIENT_SECRET,
}
exports.authConfig = {
NODE_ENV: "development",
PORT: process.env.AUTH_PORT,
APP_URL: process.env.AUTH_APP_URL,
API_URL: process.env.API_URL,
DB_NAME: process.env.AUTH_DB_NAME,
DB_USER: "root",
TEST_CERTS: 1,
DB_PASSWORD: process.env.MYSQL_PASSWORD,
DB_HOST: process.env.MYSQL_HOST,
MAIL_SERVER_URL: process.env.MAIL_TRANSPORT_SMTP_HOST,
MAIL_SERVER_PORT: process.env.MAIL_TRANSPORT_SMTP_PORT,
MAIL_SERVER_SECURE: process.env.MAIL_TRANSPORT_SMTP_REQUIRESSL,
MAIL_SERVER_PASSWORD: process.env.MAIL_TRANSPORT_SMTP_AUTH_PASS,
MAIL_SERVER_USER_NAME: process.env.MAIL_TRANSPORT_SMTP_AUTH_USER,
SESSION_SECRET: process.env.SESSION_SECRET,
EMAIL_ASSETS_URL: process.env.AUTH_EMAIL_ASSETS_URL,
FRONTEND_URL: process.env.FRONTEND_URL,
FROM_NAME: process.env.AUTH_MAIL_FROM_NAME,
FROM_EMAIL: process.env.AUTH_MAIL_FROM_MAIL,
COOKIE_SECURE_OFF: process.env.COOKIE_SECURE_OFF,
AUTH_FIRST_CLIENT_ID: process.env.AUTH_FIRST_CLIENT_ID,
AUTH_FIRST_CLIENT_SECRET: process.env.AUTH_FIRST_CLIENT_SECRET,
AUTH_FIRST_CLIENT_URL: process.env.FRONTEND_URL,
AUTH_FIRST_CLIENT_LOGIN_CODE: process.env.AUTH_FIRST_CLIENT_LOGIN_CODE,
MONGO_DB_HOST: process.env.FRONTEND_MONGO_DB_HOST,
MONGO_DB_PORT: process.env.FRONTEND_MONGO_PORT,
}
exports.adminConfig = {
SITE_ID: "1",
PORT: process.env.ADMIN_PORT,
BASIC_AUTH_USER: process.env.ADMIN_BASIC_AUTH_USER,
BASIC_AUTH_PASSWORD: process.env.ADMIN_BASIC_AUTH_PASSWORD,
COOKIE_SECURE_OFF: "yes",
FRONTEND_URL: process.env.FRONTEND_URL,
COOKIE_SECRET: process.env.COOKIE_SECRET,
SESSION_SECRET: process.env.SESSION_SECRET,
MONGO_DB_HOST: process.env.FRONTEND_MONGO_DB_HOST,
MONGO_DB_PORT: process.env.FRONTEND_MONGO_PORT,
SITE_API_KEY: process.env.FRONTEND_SITE_API_KEY,
APP_URL: process.env.ADMIN_URL,
API_URL: process.env.API_URL,
USER_API: process.env.AUTH_APP_URL,
USER_API_CLIENT_ID: process.env.AUTH_ADMIN_CLIENT_ID,
USER_API_CLIENT_SECRET: process.env.AUTH_ADMIN_CLIENT_SECRET,
}
exports.imageConfig = {
ENVIRONMENT: "development",
PORT_API: process.env.IMAGE_PORT_API,
PORT_IMAGE_SERVER: process.env.IMAGE_PORT_STEAM,
APP_URL: process.env.IMAGE_APP_URL,
DB_HOST: process.env.MYSQL_HOST,
DB_USER: "root",
DB_PASSWORD: process.env.MYSQL_PASSWORD,
DB_NAME: process.env.IMAGE_DB_NAME,
FIRST_IMAGE_API_ACCESS_TOKEN: process.env.IMAGE_API_ACCESS_TOKEN,
COOKIE_SECURE_OFF: process.env.COOKIE_SECURE_OFF,
}