diff options
author | Girish Ramakrishnan <girish@cloudron.io> | 2020-06-24 10:48:04 -0700 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-25 08:48:44 +0200 |
commit | 6ee722111792a76aa5e1c8d42a28103cafc38e39 (patch) | |
tree | 91065ae9da2d71aec9e1324e08a8c1e8b416572f /server/initializers | |
parent | 5bccbb0ecd2d13c19e3745eb05451610851c7117 (diff) | |
download | PeerTube-6ee722111792a76aa5e1c8d42a28103cafc38e39.tar.gz PeerTube-6ee722111792a76aa5e1c8d42a28103cafc38e39.tar.zst PeerTube-6ee722111792a76aa5e1c8d42a28103cafc38e39.zip |
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
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/config.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 5b402dd74..48e2cbc1a 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -20,7 +20,7 @@ const CONFIG = { | |||
20 | HOSTNAME: config.get<string>('listen.hostname') | 20 | HOSTNAME: config.get<string>('listen.hostname') |
21 | }, | 21 | }, |
22 | DATABASE: { | 22 | DATABASE: { |
23 | DBNAME: 'peertube' + config.get<string>('database.suffix'), | 23 | DBNAME: config.has('database.name') ? config.get<string>('database.name') : 'peertube' + config.get<string>('database.suffix'), |
24 | HOSTNAME: config.get<string>('database.hostname'), | 24 | HOSTNAME: config.get<string>('database.hostname'), |
25 | PORT: config.get<number>('database.port'), | 25 | PORT: config.get<number>('database.port'), |
26 | USERNAME: config.get<string>('database.username'), | 26 | USERNAME: config.get<string>('database.username'), |