Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ database:
redis:
hostname: '127.0.0.1'
port: 6379
auth: null # Used by both standalone and sentinel
auth: null
db: 0
sentinel:
enabled: false
enable_tls: false
master_name: ''
password: ''
sentinels:
- hostname: ''
- host: ''
port: 26379

# SMTP server to send emails
Expand Down
5 changes: 3 additions & 2 deletions config/production.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,15 @@ database:
redis:
hostname: '127.0.0.1'
port: 6379
auth: null # Used by both standalone and sentinel
auth: null
db: 0
sentinel:
enabled: false
enable_tls: false
master_name: ''
password: ''
sentinels:
- hostname: ''
- host: ''
port: 26379

# SMTP server to send emails
Expand Down
2 changes: 1 addition & 1 deletion server/core/initializers/checker-before-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export function checkMissedConfig () {
[ // set
[ 'redis.hostname', 'redis.port' ], // alternative
[ 'redis.socket' ],
[ 'redis.sentinel.master_name', 'redis.sentinel.sentinels[0].hostname', 'redis.sentinel.sentinels[0].port' ]
[ 'redis.sentinel.master_name', 'redis.sentinel.sentinels[0].host', 'redis.sentinel.sentinels[0].port' ]
]
]
const miss: string[] = []
Expand Down
5 changes: 3 additions & 2 deletions server/core/initializers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ const CONFIG = {
SENTINEL: {
ENABLED: config.has('redis.sentinel.enabled') ? config.get<boolean>('redis.sentinel.enabled') : false,
ENABLE_TLS: config.has('redis.sentinel.enable_tls') ? config.get<boolean>('redis.sentinel.enable_tls') : false,
SENTINELS: config.has('redis.sentinel.sentinels') ? config.get<{ hostname: string, port: number }[]>('redis.sentinel.sentinels') : [],
MASTER_NAME: config.has('redis.sentinel.master_name') ? config.get<string>('redis.sentinel.master_name') : null
SENTINELS: config.has('redis.sentinel.sentinels') ? config.get<{ host: string, port: number }[]>('redis.sentinel.sentinels') : [],
MASTER_NAME: config.has('redis.sentinel.master_name') ? config.get<string>('redis.sentinel.master_name') : null,
PASSWORD: config.has('redis.sentinel.password') ? config.get<string>('redis.sentinel.password') : null
}
},
SMTP: {
Expand Down
3 changes: 2 additions & 1 deletion server/core/lib/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class Redis {
connectionName,
connectTimeout,
enableTLSForSentinelMode: CONFIG.REDIS.SENTINEL.ENABLE_TLS,
sentinelPassword: CONFIG.REDIS.AUTH,
sentinelPassword: CONFIG.REDIS.SENTINEL.PASSWORD,
password: CONFIG.REDIS.AUTH,
sentinels: CONFIG.REDIS.SENTINEL.SENTINELS,
name: CONFIG.REDIS.SENTINEL.MASTER_NAME,
...options
Expand Down
Loading