parent
2e8e97f313
commit
30c82f0d2e
|
@ -25,6 +25,7 @@ redis:
|
||||||
hostname: 'localhost'
|
hostname: 'localhost'
|
||||||
port: 6379
|
port: 6379
|
||||||
auth: null
|
auth: null
|
||||||
|
db: 0
|
||||||
|
|
||||||
smtp:
|
smtp:
|
||||||
hostname: null
|
hostname: null
|
||||||
|
|
|
@ -27,6 +27,7 @@ redis:
|
||||||
hostname: 'localhost'
|
hostname: 'localhost'
|
||||||
port: 6379
|
port: 6379
|
||||||
auth: null
|
auth: null
|
||||||
|
db: 0
|
||||||
|
|
||||||
# SMTP server to send emails
|
# SMTP server to send emails
|
||||||
smtp:
|
smtp:
|
||||||
|
|
|
@ -22,7 +22,7 @@ function checkMissedConfig () {
|
||||||
'webserver.https', 'webserver.hostname', 'webserver.port',
|
'webserver.https', 'webserver.hostname', 'webserver.port',
|
||||||
'trust_proxy',
|
'trust_proxy',
|
||||||
'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',
|
'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',
|
||||||
'redis.hostname', 'redis.port', 'redis.auth',
|
'redis.hostname', 'redis.port', 'redis.auth', 'redis.db',
|
||||||
'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
|
'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
|
||||||
'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
|
'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
|
||||||
'log.level',
|
'log.level',
|
||||||
|
|
|
@ -111,7 +111,8 @@ const CONFIG = {
|
||||||
REDIS: {
|
REDIS: {
|
||||||
HOSTNAME: config.get<string>('redis.hostname'),
|
HOSTNAME: config.get<string>('redis.hostname'),
|
||||||
PORT: config.get<number>('redis.port'),
|
PORT: config.get<number>('redis.port'),
|
||||||
AUTH: config.get<string>('redis.auth')
|
AUTH: config.get<string>('redis.auth'),
|
||||||
|
DB: config.get<number>('redis.db')
|
||||||
},
|
},
|
||||||
SMTP: {
|
SMTP: {
|
||||||
HOSTNAME: config.get<string>('smtp.hostname'),
|
HOSTNAME: config.get<string>('smtp.hostname'),
|
||||||
|
|
|
@ -56,7 +56,8 @@ class JobQueue {
|
||||||
redis: {
|
redis: {
|
||||||
host: CONFIG.REDIS.HOSTNAME,
|
host: CONFIG.REDIS.HOSTNAME,
|
||||||
port: CONFIG.REDIS.PORT,
|
port: CONFIG.REDIS.PORT,
|
||||||
auth: CONFIG.REDIS.AUTH
|
auth: CONFIG.REDIS.AUTH,
|
||||||
|
db: CONFIG.REDIS.DB
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@ class Redis {
|
||||||
|
|
||||||
this.client = createClient({
|
this.client = createClient({
|
||||||
host: CONFIG.REDIS.HOSTNAME,
|
host: CONFIG.REDIS.HOSTNAME,
|
||||||
port: CONFIG.REDIS.PORT
|
port: CONFIG.REDIS.PORT,
|
||||||
|
db: CONFIG.REDIS.DB
|
||||||
})
|
})
|
||||||
|
|
||||||
this.client.on('error', err => {
|
this.client.on('error', err => {
|
||||||
|
|
Loading…
Reference in New Issue