Add ssl support to postgresql

pull/3105/head
Chocobozzz 2020-08-24 11:38:57 +02:00
parent 4f24f16e27
commit b0ce7c39dc
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
5 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,7 @@ trust_proxy:
database:
hostname: 'localhost'
port: 5432
ssl: false
suffix: '_dev'
username: 'peertube'
password: 'peertube'

View File

@ -36,6 +36,7 @@ trust_proxy:
database:
hostname: 'localhost'
port: 5432
ssl: false
suffix: '_prod'
username: 'peertube'
password: 'peertube'

View File

@ -23,6 +23,7 @@ const CONFIG = {
DBNAME: config.has('database.name') ? config.get<string>('database.name') : 'peertube' + config.get<string>('database.suffix'),
HOSTNAME: config.get<string>('database.hostname'),
PORT: config.get<number>('database.port'),
SSL: config.get<boolean>('database.ssl'),
USERNAME: config.get<string>('database.username'),
PASSWORD: config.get<string>('database.password'),
POOL: {

View File

@ -48,6 +48,7 @@ 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
@ -58,6 +59,7 @@ const sequelizeTypescript = new SequelizeTypescript({
port,
username,
password,
ssl,
pool: {
max: poolMax
},

View File

@ -30,6 +30,7 @@ trust_proxy:
database:
hostname: 'postgres'
port: 5432
ssl: false
suffix: ''
username: 'postgres'
password: 'postgres'