aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker-before-init.ts3
-rw-r--r--server/initializers/config.ts8
2 files changed, 9 insertions, 2 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index 2f5a274e4..0a315ea70 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -84,7 +84,8 @@ function checkMissedConfig () {
84 const requiredAlternatives = [ 84 const requiredAlternatives = [
85 [ // set 85 [ // set
86 [ 'redis.hostname', 'redis.port' ], // alternative 86 [ 'redis.hostname', 'redis.port' ], // alternative
87 [ 'redis.socket' ] 87 [ 'redis.socket' ],
88 [ 'redis.sentinel.master_name', 'redis.sentinel.sentinels[0].hostname', 'redis.sentinel.sentinels[0].port' ]
88 ] 89 ]
89 ] 90 ]
90 const miss: string[] = [] 91 const miss: string[] = []
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 9c2705689..51ac5d0ce 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -39,7 +39,13 @@ const CONFIG = {
39 PORT: config.has('redis.port') ? config.get<number>('redis.port') : null, 39 PORT: config.has('redis.port') ? config.get<number>('redis.port') : null,
40 SOCKET: config.has('redis.socket') ? config.get<string>('redis.socket') : null, 40 SOCKET: config.has('redis.socket') ? config.get<string>('redis.socket') : null,
41 AUTH: config.has('redis.auth') ? config.get<string>('redis.auth') : null, 41 AUTH: config.has('redis.auth') ? config.get<string>('redis.auth') : null,
42 DB: config.has('redis.db') ? config.get<number>('redis.db') : null 42 DB: config.has('redis.db') ? config.get<number>('redis.db') : null,
43 SENTINEL: {
44 ENABLED: config.has('redis.sentinel.enabled') ? config.get<boolean>('redis.sentinel.enabled') : false,
45 ENABLE_TLS: config.has('redis.sentinel.enable_tls') ? config.get<boolean>('redis.sentinel.enable_tls') : false,
46 SENTINELS: config.has('redis.sentinel.sentinels') ? config.get<{ hostname: string, port: number }[]>('redis.sentinel.sentinels') : [],
47 MASTER_NAME: config.has('redis.sentinel.master_name') ? config.get<string>('redis.sentinel.master_name') : null
48 }
43 }, 49 },
44 SMTP: { 50 SMTP: {
45 TRANSPORT: config.has('smtp.transport') ? config.get<string>('smtp.transport') : 'smtp', 51 TRANSPORT: config.has('smtp.transport') ? config.get<string>('smtp.transport') : 'smtp',