-
Notifications
You must be signed in to change notification settings - Fork 255
/
Copy pathconfig.inc.php
66 lines (64 loc) · 2.8 KB
/
config.inc.php
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
<?php
date_default_timezone_set('UTC');
$config = array(
'db' => array(
'host' => 'mysql-master',
'user' => getenv('MYSQL_USER'),
'password' => getenv('MYSQL_PASSWORD'),
'database' => getenv('MYSQL_DATABASE')
),
'redis' => array(
'host' => 'redis',
'port' => 6379,
'auth' => false
),
'projectName' => getenv('CJO_PROJECT_NAME'),
'projectURL' => getenv('CJO_BASE_URL'),
'logoURL' => getenv('CJO_BASE_URL') . 'logo.png',
'frontendURL' => getenv('CJO_BASE_URL'),
'statusPageDomain' => null,
'sessionTokenLifetime' => 15 * 60,
'sessionTokenSecret' => getenv('CJO_SESSION_TOKEN_SECRET'),
'sessionTokenRefreshInterval' => 15 * 60,
'emailVerificationTokenLifetime' => 3 * 86400,
'emailVerificationTokenSecret' => getenv('CJO_EMAIL_VERIFICATION_TOKEN_SECRET'),
'lostPasswordTokenLifetime' => 3 * 86400,
'lostPasswordTokenSecret' => getenv('CJO_LOST_PASSWORD_TOKEN_SECRET'),
'accountConfirmationTokenLifetime'=> 3 * 86400,
'accountConfirmationTokenSecret' => getenv('CJO_ACCOUNT_CONFIRMATION_TOKEN_SECRET'),
'minPasswordLength' => 8,
'passwordSaltLength' => 16,
'statusPageUniqueIdLength' => 8,
'allowdLogoMimeTypes' => ['image/png'],
'fallbackLanguage' => 'en',
'languages' => ['en', 'de', 'fr'],
'emailSender' => [getenv('CJO_PROJECT_NAME'), getenv('CJO_EMAIL_SENDER')],
'emailReturnPath' => getenv('CJO_EMAIL_RETURN_PATH'),
'emailVerpSecret' => getenv('CJO_VERP_SECRET'),
'recaptchaSecretKey' => null,
'allowCredentialsOrigins' => [substr(getenv('CJO_BASE_URL'), 0, -1)],
'refreshTokenCookieDomain' => '.' . getenv('CJO_DOMAIN'),
'refreshTokenValiditySeconds' => 365 * 86400,
'refreshTokenLength' => 64,
'testRunLifetime' => 5 * 60,
'yubicoOTP' => array(
'enable' => false,
'clientId' => 'PLACE_CLIENT_ID_HERE',
'secretKey' => 'PLACE_SECRET_KEY_HERE'
)
);
if (empty($config['sessionTokenSecret'])) {
throw new Exception('Please set CJO_SESSION_TOKEN_SECRET in .env!');
}
if (empty($config['emailVerificationTokenSecret'])) {
throw new Exception('Please set CJO_EMAIL_VERIFICATION_TOKEN_SECRET in .env!');
}
if (empty($config['lostPasswordTokenSecret'])) {
throw new Exception('Please set CJO_LOST_PASSWORD_TOKEN_SECRET in .env!');
}
if (empty($config['accountConfirmationTokenSecret'])) {
throw new Exception('Please set CJO_ACCOUNT_CONFIRMATION_TOKEN_SECRET in .env!');
}
if (empty($config['emailVerpSecret'])) {
throw new Exception('Please set CJO_VERP_SECRET in .env!');
}