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: database:
hostname: 'localhost' hostname: 'localhost'
port: 5432 port: 5432
ssl: false
suffix: '_dev' suffix: '_dev'
username: 'peertube' username: 'peertube'
password: 'peertube' password: 'peertube'

View File

@ -36,6 +36,7 @@ trust_proxy:
database: database:
hostname: 'localhost' hostname: 'localhost'
port: 5432 port: 5432
ssl: false
suffix: '_prod' suffix: '_prod'
username: 'peertube' username: 'peertube'
password: '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'), DBNAME: config.has('database.name') ? config.get<string>('database.name') : 'peertube' + config.get<string>('database.suffix'),
HOSTNAME: config.get<string>('database.hostname'), HOSTNAME: config.get<string>('database.hostname'),
PORT: config.get<number>('database.port'), PORT: config.get<number>('database.port'),
SSL: config.get<boolean>('database.ssl'),
USERNAME: config.get<string>('database.username'), USERNAME: config.get<string>('database.username'),
PASSWORD: config.get<string>('database.password'), PASSWORD: config.get<string>('database.password'),
POOL: { POOL: {

View File

@ -48,6 +48,7 @@ const dbname = CONFIG.DATABASE.DBNAME
const username = CONFIG.DATABASE.USERNAME const username = CONFIG.DATABASE.USERNAME
const password = CONFIG.DATABASE.PASSWORD const password = CONFIG.DATABASE.PASSWORD
const host = CONFIG.DATABASE.HOSTNAME const host = CONFIG.DATABASE.HOSTNAME
const ssl = CONFIG.DATABASE.SSL
const port = CONFIG.DATABASE.PORT const port = CONFIG.DATABASE.PORT
const poolMax = CONFIG.DATABASE.POOL.MAX const poolMax = CONFIG.DATABASE.POOL.MAX
@ -58,6 +59,7 @@ const sequelizeTypescript = new SequelizeTypescript({
port, port,
username, username,
password, password,
ssl,
pool: { pool: {
max: poolMax max: poolMax
}, },

View File

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