diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 41dfa4cf..169f22fd 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -3,7 +3,7 @@ name: 🎭 Staging on: push: branches: - - main + - 336/correction-development-env jobs: migrate: diff --git a/drizzle.config.ts b/drizzle.config.ts index b80e3b97..b5345ce0 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -11,7 +11,7 @@ export default { user: process.env.DATABASE_USER, password: process.env.DATABASE_PASSWORD, database: process.env.DATABASE_NAME!, - ssl: process.env.NODE_ENV === "production" && { + ssl: process.env.DATABASE_ENV !== "development" && { rejectUnauthorized: false, }, }, diff --git a/sample.env b/sample.env index bede0a42..be785c4d 100644 --- a/sample.env +++ b/sample.env @@ -3,4 +3,5 @@ DATABASE_PASSWORD=postgres DATABASE_NAME=zoning DATABASE_PORT=8010 DATABASE_HOST=localhost +DATABASE_ENV=development STORAGE_URL= diff --git a/src/config.ts b/src/config.ts index ccf6469a..63f05711 100644 --- a/src/config.ts +++ b/src/config.ts @@ -7,7 +7,7 @@ export const DbConfig = registerAs("db", () => ({ user: process.env.DATABASE_USER, password: process.env.DATABASE_PASSWORD, name: process.env.DATABASE_NAME, - nodeEnv: process.env.NODE_ENV, + env: process.env.DATABASE_ENV, })); export const FeatureFlagConfig = registerAs("featureFlag", () => ({})); diff --git a/src/global/providers/db.provider.ts b/src/global/providers/db.provider.ts index 24fa87a3..9b7db313 100644 --- a/src/global/providers/db.provider.ts +++ b/src/global/providers/db.provider.ts @@ -18,7 +18,7 @@ export const DbProvider: FactoryProvider = { user: dbConfig.user, password: dbConfig.password, database: dbConfig.name, - ssl: dbConfig.nodeEnv === "production" && { + ssl: dbConfig.env !== "development" && { rejectUnauthorized: false, }, });