diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 6452a0a..bc0f4e9 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -29,6 +29,7 @@ jobs: run: npm run drizzle:migrate deploy: name: 🚀 Deploy to production + needs: migrate environment: name: production-zoning-api url: https://zoning-api.nycplanningdigital.com diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 375c95f..c42efd0 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -32,6 +32,7 @@ jobs: run: npm run drizzle:migrate deploy: name: 🚀 Deploy to staging + needs: migrate environment: name: staging-zoning-api url: https://staging-zoning-api.nycplanningdigital.com diff --git a/db/pg-client.ts b/db/pg-client.ts index c406131..efdab67 100644 --- a/db/pg-client.ts +++ b/db/pg-client.ts @@ -7,4 +7,7 @@ export const pgClient = new Client({ user: process.env.DATABASE_USER, password: process.env.DATABASE_PASSWORD, database: process.env.DATABASE_NAME!, + ssl: process.env.DATABASE_ENV !== "development" && { + rejectUnauthorized: false, + }, });