mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 04:49:16 -06:00
Fix database ssl connection
This commit is contained in:
parent
b9244002fc
commit
6bc672da81
@ -51,18 +51,27 @@ const dbname = CONFIG.DATABASE.DBNAME
|
||||
const username = CONFIG.DATABASE.USERNAME
|
||||
const password = CONFIG.DATABASE.PASSWORD
|
||||
const host = CONFIG.DATABASE.HOSTNAME
|
||||
const ssl = CONFIG.DATABASE.SSL
|
||||
const port = CONFIG.DATABASE.PORT
|
||||
const poolMax = CONFIG.DATABASE.POOL.MAX
|
||||
|
||||
let dialectOptions: any = {}
|
||||
|
||||
if (CONFIG.DATABASE.SSL) {
|
||||
dialectOptions = {
|
||||
ssl: {
|
||||
rejectUnauthorized: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const sequelizeTypescript = new SequelizeTypescript({
|
||||
database: dbname,
|
||||
dialect: 'postgres',
|
||||
dialectOptions,
|
||||
host,
|
||||
port,
|
||||
username,
|
||||
password,
|
||||
ssl,
|
||||
pool: {
|
||||
max: poolMax
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user