File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ services:
117
117
POSTGRES_USER : storagemq
118
118
POSTGRES_PW : storagemq-pw
119
119
POSTGRES_SCHEMA : ' storage'
120
+ POSTGRES_SSL : " false"
120
121
121
122
AMQP_URL : ' amqp://rabbit_adm:R4bb!7_4DM_p4SS@rabbitmq:5672'
122
123
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export const POSTGRES_USER = readEnvOrDie('POSTGRES_USER')
9
9
export const POSTGRES_PW = readEnvOrDie ( 'POSTGRES_PW' )
10
10
export const POSTGRES_DB = readEnvOrDie ( 'POSTGRES_DB' )
11
11
export const POSTGRES_SCHEMA = readEnvOrDie ( 'POSTGRES_SCHEMA' )
12
+ export const POSTGRES_SSL = readEnvOrDie ( 'POSTGRES_SSL' ) . toLowerCase ( ) === 'true'
12
13
13
14
export const AMQP_URL = readEnvOrDie ( 'AMQP_URL' )
14
15
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
20
20
CONNECTION_BACKOFF ,
21
21
POSTGRES_HOST ,
22
22
POSTGRES_PORT ,
23
+ POSTGRES_SSL ,
23
24
POSTGRES_USER ,
24
25
POSTGRES_PW , POSTGRES_DB
25
26
} from './env'
@@ -32,6 +33,7 @@ const POOL_CONFIG: PoolConfig = {
32
33
user : POSTGRES_USER ,
33
34
password : POSTGRES_PW ,
34
35
database : POSTGRES_DB ,
36
+ ssl : POSTGRES_SSL ? { rejectUnauthorized : false } : false ,
35
37
max : 20 ,
36
38
idleTimeoutMillis : 30000 ,
37
39
connectionTimeoutMillis : 2000
You can’t perform that action at this time.
0 commit comments