about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authorSascha <sascha@serenitylabs.cloud>2019-03-08 14:36:28 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-08 14:36:28 +0100
commit42e733681aef45c9e6224aed288e4c845782c173 (patch)
tree6e0ee536fd866bb7415350d6d01566c9abda267e /streaming
parent9e33a71efa37945e683bd659054fe35d8df1574d (diff)
config: add DB_SSLMODE for managed/remote PG (#10210)
* config: add DB_SSLMODE for managed/remote PG

* streaming: set PG sslmode, defaults to prefer
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/streaming/index.js b/streaming/index.js
index b4d09d0ad..21a1d47ef 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -89,6 +89,9 @@ const startWorker = (workerId) => {
       host:     process.env.DB_HOST || pg.defaults.host,
       port:     process.env.DB_PORT || pg.defaults.port,
       max:      10,
+      ssl: {
+        sslmode: process.env.DB_SSLMODE || 'prefer',
+      },
     },
 
     production: {
@@ -98,6 +101,9 @@ const startWorker = (workerId) => {
       host:     process.env.DB_HOST || 'localhost',
       port:     process.env.DB_PORT || 5432,
       max:      10,
+      ssl: {
+        sslmode: process.env.DB_SSLMODE || 'prefer',
+      },
     },
   };