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
This commit is contained in:
parent
5bccbb0ecd
commit
6ee7221117
|
@ -33,7 +33,7 @@ rates_limit:
|
||||||
trust_proxy:
|
trust_proxy:
|
||||||
- 'loopback'
|
- 'loopback'
|
||||||
|
|
||||||
# Your database name will be "peertube"+database.suffix
|
# Your database name will be database.name OR "peertube"+database.suffix
|
||||||
database:
|
database:
|
||||||
hostname: 'localhost'
|
hostname: 'localhost'
|
||||||
port: 5432
|
port: 5432
|
||||||
|
|
|
@ -32,7 +32,7 @@ rates_limit:
|
||||||
trust_proxy:
|
trust_proxy:
|
||||||
- 'loopback'
|
- 'loopback'
|
||||||
|
|
||||||
# Your database name will be "peertube"+database.suffix
|
# Your database name will be database.name OR "peertube"+database.suffix
|
||||||
database:
|
database:
|
||||||
hostname: 'localhost'
|
hostname: 'localhost'
|
||||||
port: 5432
|
port: 5432
|
||||||
|
|
|
@ -20,7 +20,7 @@ const CONFIG = {
|
||||||
HOSTNAME: config.get<string>('listen.hostname')
|
HOSTNAME: config.get<string>('listen.hostname')
|
||||||
},
|
},
|
||||||
DATABASE: {
|
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'),
|
HOSTNAME: config.get<string>('database.hostname'),
|
||||||
PORT: config.get<number>('database.port'),
|
PORT: config.get<number>('database.port'),
|
||||||
USERNAME: config.get<string>('database.username'),
|
USERNAME: config.get<string>('database.username'),
|
||||||
|
|
|
@ -26,7 +26,7 @@ trust_proxy:
|
||||||
- 'linklocal'
|
- 'linklocal'
|
||||||
- 'uniquelocal'
|
- 'uniquelocal'
|
||||||
|
|
||||||
# Your database name will be "peertube"+database.suffix
|
# Your database name will be database.name or "peertube"+database.suffix
|
||||||
database:
|
database:
|
||||||
hostname: 'postgres'
|
hostname: 'postgres'
|
||||||
port: 5432
|
port: 5432
|
||||||
|
|
Loading…
Reference in New Issue