From a469eea1550f28dc0cbd999c77c5d52bf0b5df84 Mon Sep 17 00:00:00 2001 From: alexeh Date: Mon, 14 Oct 2024 08:52:39 +0200 Subject: [PATCH] set ssl for adminjs --- admin/datasource.ts | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/datasource.ts b/admin/datasource.ts index 769f38b3..4fb6f9da 100644 --- a/admin/datasource.ts +++ b/admin/datasource.ts @@ -14,4 +14,8 @@ export const dataSource = new DataSource({ database: process.env.DB_NAME || "blc", entities: [User, Country, CarbonInputEntity, CostInput], synchronize: false, + ssl: + process.env.NODE_ENV === "production" + ? { rejectUnauthorized: false } + : false, }); diff --git a/package.json b/package.json index 06ecda9d..f2edc4a9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "api:dev": "pnpm --filter api run start:dev", "api:build": "pnpm --filter api run build", "api:prod": "NODE_ENV=production pnpm --filter api run start:prod", - "admin:prod": "pnpm --filter admin run start:prod", + "admin:prod": "NODE_ENV=production pnpm --filter admin run start:prod", "client:deps": "pnpm --filter client install", "client:dev": "pnpm --filter client run dev", "client:build": "pnpm --filter client run build",