]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add ssl support to postgresql
authorChocobozzz <me@florianbigard.com>
Mon, 24 Aug 2020 09:38:57 +0000 (11:38 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 24 Aug 2020 09:38:57 +0000 (11:38 +0200)
config/default.yaml
config/production.yaml.example
server/initializers/config.ts
server/initializers/database.ts
support/docker/production/config/production.yaml

index a3af1b15f16ec5d0d7401eae32e88966d950329c..0c2d165be89843afea29e3fb5a64c4e325f0711b 100644 (file)
@@ -37,6 +37,7 @@ trust_proxy:
 database:
   hostname: 'localhost'
   port: 5432
+  ssl: false
   suffix: '_dev'
   username: 'peertube'
   password: 'peertube'
index c1e7c6c03e944108b3d181d2491d5ae48241d0c5..ca9c16739b87022fc117d6cc5923523de8be1f99 100644 (file)
@@ -36,6 +36,7 @@ trust_proxy:
 database:
   hostname: 'localhost'
   port: 5432
+  ssl: false
   suffix: '_prod'
   username: 'peertube'
   password: 'peertube'
index 32bd3bbe2aac33134fcc8861d8e696e38f763500..04ba605b698bd2a3e1a81dc127697e52f9257181 100644 (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: {
index 5cf5765f681b09ccb63724bf64e8294c46249157..e05e7c3352097c121378d4b4cb9e1c1233217079 100644 (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
   },
index a32cf1a89038de64e822b9f6eecaed2b1ecc2baf..6215b9fdfa3864152d357db57a4762209eb62512 100644 (file)
@@ -30,6 +30,7 @@ trust_proxy:
 database:
   hostname: 'postgres'
   port: 5432
+  ssl: false
   suffix: ''
   username: 'postgres'
   password: 'postgres'