From: xangelo Date: Wed, 4 Dec 2024 18:26:13 +0000 (-0500) Subject: chore(db): fix db ssl for DO X-Git-Tag: v0.4.4~23 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=f40d21fdfdb79bd9e37c70db035a3cc1eb40347c;p=risinglegends.git chore(db): fix db ssl for DO --- diff --git a/knexfile.ts b/knexfile.ts index 92d17cd..987738c 100644 --- a/knexfile.ts +++ b/knexfile.ts @@ -8,7 +8,12 @@ const connectionUrl = process.env.DATABASE_URL; const config: { [key: string]: Knex.Config } = { development: { client: "pg", - connection: connectionUrl, + connection: { + connectionString: connectionUrl, + ssl: { + rejectUnauthorized: false + } + }, pool: { min: 2, max: 10 @@ -20,7 +25,12 @@ const config: { [key: string]: Knex.Config } = { production: { client: "pg", - connection: connectionUrl, + connection: { + connectionString: connectionUrl, + ssl: { + rejectUnauthorized: false + } + }, pool: { min: 2, max: 10 diff --git a/src/server/lib/db.ts b/src/server/lib/db.ts index a950463..7b9fe4a 100644 --- a/src/server/lib/db.ts +++ b/src/server/lib/db.ts @@ -7,5 +7,10 @@ const connectionUrl = process.env.DATABASE_URL; export const db = knex({ client: 'pg', - connection: connectionUrl + connection: { + connectionString: connectionUrl, + ssl: { + rejectUnauthorized: false + } + } });