From 44b23bc220decfb58d32f82414c4c8b418710c44 Mon Sep 17 00:00:00 2001 From: xangelo Date: Wed, 4 Dec 2024 16:38:32 -0500 Subject: [PATCH] chore(infra): remove DO, so much for that plan --- .github/workflows/build.yml | 4 ++-- knexfile.ts | 10 ++-------- src/server/lib/db.ts | 9 ++------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4e92d9..40d8408 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,10 +23,10 @@ jobs: run: npm ci - name: Build - run: npm run build:prod + run: npm run build - name: Upload build artifacts uses: actions/upload-artifact@v3 with: name: dist - path: dist/ + path: . diff --git a/knexfile.ts b/knexfile.ts index 751c83b..e859fa3 100644 --- a/knexfile.ts +++ b/knexfile.ts @@ -12,10 +12,7 @@ const config: { [key: string]: Knex.Config } = { development: { client: "pg", connection: { - connectionString: connectionUrl, - ssl: { - ca: readFileSync(path.join(__dirname, 'ca.crt')) - } + connectionString: connectionUrl }, pool: { min: 2, @@ -29,10 +26,7 @@ const config: { [key: string]: Knex.Config } = { production: { client: "pg", connection: { - connectionString: connectionUrl, - ssl: { - ca: readFileSync(path.join(__dirname, 'ca.crt')) - } + connectionString: connectionUrl }, pool: { min: 2, diff --git a/src/server/lib/db.ts b/src/server/lib/db.ts index 7a0b7dc..a9d45bc 100644 --- a/src/server/lib/db.ts +++ b/src/server/lib/db.ts @@ -7,14 +7,9 @@ dotenv(); const connectionUrl = process.env.DATABASE_URL; -writeFileSync(path.join(__dirname, 'ca.crt'), process.env.CA_CERT as string); - export const db = knex({ client: 'pg', connection: { - connectionString: connectionUrl, - ssl: { - ca: readFileSync(path.join(__dirname, 'ca.crt')) - } + connectionString: connectionUrl } -}); +}); \ No newline at end of file -- 2.25.1