File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ async function createPostgresClient(
103103 try {
104104 return postgres ( connectionString , {
105105 connect_timeout : 10 ,
106+ ssl : config . NODE_ENV === "production" ? "require" : undefined ,
106107 } ) ;
107108 } catch ( e ) {
108109 log . error ( `Unable to connect to the database (${ useReadReplica ? 'read replica' : 'primary' } )` ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ RUN npm install -g pnpm
44ENV PATH=/app/node_modules/.bin:$PATH
55COPY package.json ./
66COPY pnpm-lock.yaml ./
7- RUN pnpm install
7+ COPY pnpm-workspace-docker.yaml ./pnpm-workspace.yaml
8+ RUN pnpm install --frozen-lockfile
89COPY . ./
910RUN pnpm build
1011
Original file line number Diff line number Diff line change 1+ dangerouslyAllowAllBuilds : true
Original file line number Diff line number Diff line change @@ -115,9 +115,13 @@ async function main() {
115115 ssl : { rejectUnauthorized : false } ,
116116 } ;
117117 } else {
118+ const sslConfig = config . NODE_ENV === "production"
119+ ? { rejectUnauthorized : false }
120+ : undefined ;
118121 pgBossConfig = {
119122 ...pgBossCommonConfig ,
120123 connectionString : config . CONNECTION_STRING ,
124+ ssl : sslConfig ,
121125 } ;
122126 }
123127
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ async function createPostgresClient(
103103 try {
104104 return postgres ( connectionString , {
105105 connect_timeout : 10 ,
106+ ssl : config . NODE_ENV === "production" ? "require" : undefined ,
106107 } ) ;
107108 } catch ( e ) {
108109 log . error ( `Unable to connect to the database (${ useReadReplica ? 'read replica' : 'primary' } )` ) ;
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ async function createPostgresClient(
102102 try {
103103 return postgres ( connectionString , {
104104 connect_timeout : 10 ,
105+ ssl : config . NODE_ENV === "production" ? "require" : undefined ,
105106 } ) ;
106107 } catch ( e ) {
107108 log . error ( `Unable to connect to the database (${ useReadReplica ? 'read replica' : 'primary' } )` ) ;
You can’t perform that action at this time.
0 commit comments