suffix: '_dev'
username: 'peertube'
password: 'peertube'
+ pool:
+ max: 5
# You can also specify a 'socket' path to a unix socket but first need to
# comment out hostname and port
suffix: '_prod'
username: 'peertube'
password: 'peertube'
+ pool:
+ max: 5
# Redis server for short time storage
# You can also specify a 'socket' path to a unix socket but first need to
const required = [ 'listen.port', 'listen.hostname',
'webserver.https', 'webserver.hostname', 'webserver.port',
'trust_proxy',
- 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',
+ 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 'database.pool.max',
'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',
'log.level',
HOSTNAME: config.get<string>('database.hostname'),
PORT: config.get<number>('database.port'),
USERNAME: config.get<string>('database.username'),
- PASSWORD: config.get<string>('database.password')
+ PASSWORD: config.get<string>('database.password'),
+ POOL: {
+ MAX: config.get<number>('database.pool.max')
+ }
},
REDIS: {
HOSTNAME: config.has('redis.hostname') ? config.get<string>('redis.hostname') : null,
const password = CONFIG.DATABASE.PASSWORD
const host = CONFIG.DATABASE.HOSTNAME
const port = CONFIG.DATABASE.PORT
+const poolMax = CONFIG.DATABASE.POOL.MAX
const sequelizeTypescript = new SequelizeTypescript({
database: dbname,
port,
username,
password,
+ pool: {
+ max: poolMax
+ },
benchmark: isTestInstance(),
isolationLevel: SequelizeTypescript.Transaction.ISOLATION_LEVELS.SERIALIZABLE,
operatorsAliases: false,