Add database.name config option

If database.name is set, we use it as the complete database name.
If unset, we use the "peertube"+database.suffix as the complete database
name.

Fixes #1620
pull/2904/head
Girish Ramakrishnan 2020-06-24 10:48:04 -07:00 committed by Chocobozzz
parent 5bccbb0ecd
commit 6ee7221117
4 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ rates_limit:
trust_proxy:
- 'loopback'
# Your database name will be "peertube"+database.suffix
# Your database name will be database.name OR "peertube"+database.suffix
database:
hostname: 'localhost'
port: 5432

View File

@ -32,7 +32,7 @@ rates_limit:
trust_proxy:
- 'loopback'
# Your database name will be "peertube"+database.suffix
# Your database name will be database.name OR "peertube"+database.suffix
database:
hostname: 'localhost'
port: 5432

View File

@ -20,7 +20,7 @@ const CONFIG = {
HOSTNAME: config.get<string>('listen.hostname')
},
DATABASE: {
DBNAME: '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'),
PORT: config.get<number>('database.port'),
USERNAME: config.get<string>('database.username'),

View File

@ -26,7 +26,7 @@ trust_proxy:
- 'linklocal'
- 'uniquelocal'
# Your database name will be "peertube"+database.suffix
# Your database name will be database.name or "peertube"+database.suffix
database:
hostname: 'postgres'
port: 5432