From 78ee14cd8edda93d1dbb7ea1ef6932393680efb2 Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:36:47 -0400 Subject: [PATCH 1/8] MGB's mail relay server is not recognized by nodemailer. Hence, ignore this recognition. Reference: https://nodemailer.com/smtp#3-allow-selfsigned-certificates --- server/mailer/BaseMailer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/mailer/BaseMailer.js b/server/mailer/BaseMailer.js index b135a2ac..e33888de 100644 --- a/server/mailer/BaseMailer.js +++ b/server/mailer/BaseMailer.js @@ -22,6 +22,10 @@ export default class BaseMailer { user: process.env.SMTP_USER, pass: process.env.SMTP_PASS, }, + tls: { + // do not fail on invalid certs + rejectUnauthorized: process.env.SMTP_REJECT_UNAUTHORIZED, + }, }) return await transporter.sendMail({ From 756ee9f56eaca870bfe89a7c6572f1d0467feee7 Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:41:58 -0400 Subject: [PATCH 2/8] include SMTP_REJECT_UNAUTHORIZED option --- .env.sample | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.sample b/.env.sample index 8ebbd4fa..b9cbfb67 100644 --- a/.env.sample +++ b/.env.sample @@ -4,6 +4,7 @@ SMTP_HOST=your.smtpserver.com SMTP_PORT=587 SMTP_USER=yoursmtpuser SMTP_PASS=yoursmtppassword +SMTP_REJECT_UNAUTHORIZED=false ADMIN_EMAIL=adminaccountemail@example.com EMAIL_SENDER=automatedemailfromaddress@example.com HOME_URL=your.domain.com From 2be506280c2d35d201dd4dfba549ce98999b130b Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:42:53 -0400 Subject: [PATCH 3/8] use ports instead of expose --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 846b09bc..0bfe1811 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,8 +30,8 @@ services: networks: - app-tier # Expose port for Nginx Proxy Manager to access - expose: - - 8000 + ports: + - 8000:8000 environment: - HOME_URL=https://dpdash.local From a986af5ff10e4dcfd2afef86c2624ca0f9260945 Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Tue, 30 Sep 2025 17:25:39 -0400 Subject: [PATCH 4/8] SMTP_REJECT_UNAUTHORIZED comparison logic needed fixing --- server/mailer/BaseMailer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/mailer/BaseMailer.js b/server/mailer/BaseMailer.js index e33888de..1c978cd5 100644 --- a/server/mailer/BaseMailer.js +++ b/server/mailer/BaseMailer.js @@ -24,7 +24,7 @@ export default class BaseMailer { }, tls: { // do not fail on invalid certs - rejectUnauthorized: process.env.SMTP_REJECT_UNAUTHORIZED, + rejectUnauthorized: process.env.SMTP_REJECT_UNAUTHORIZED == 'true', }, }) From bd5a3432f51bdd5c8f80829eaa0ce0247596ffb1 Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Tue, 30 Sep 2025 17:28:31 -0400 Subject: [PATCH 5/8] clarify comment --- server/mailer/BaseMailer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/mailer/BaseMailer.js b/server/mailer/BaseMailer.js index 1c978cd5..df856c6e 100644 --- a/server/mailer/BaseMailer.js +++ b/server/mailer/BaseMailer.js @@ -23,7 +23,8 @@ export default class BaseMailer { pass: process.env.SMTP_PASS, }, tls: { - // do not fail on invalid certs + // to not fail on invalid certs: + // set SMTP_REJECT_UNAUTHORIZED=false in .env file rejectUnauthorized: process.env.SMTP_REJECT_UNAUTHORIZED == 'true', }, }) From ae5b086a93bac667ecc66bffe8f959ad0787050f Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Tue, 14 Oct 2025 14:19:21 -0400 Subject: [PATCH 6/8] mongosh method of connecting to mongodb --- ON_PREM_DEPLOYMENT.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ON_PREM_DEPLOYMENT.md b/ON_PREM_DEPLOYMENT.md index 0a8d7e1c..1f386522 100644 --- a/ON_PREM_DEPLOYMENT.md +++ b/ON_PREM_DEPLOYMENT.md @@ -122,6 +122,12 @@ Nginx Proxy Manager should not be exposed to the internet. It is recommended to Find the container ID of the mongo container with `docker ps` and then run `docker exec -it /bin/bash` to get a terminal within the container. From there you can run `mongosh` to connect to the database. +Alternatively, you an download [mongosh](https://www.mongodb.com/try/download/shell) and connect directly as: + +``` +mongosh "mongodb://127.0.0.1:27017/dpdmongo?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.3.8" +``` + ### 2. Importing charts, configs, users Due to Gnar company's changes in database structure, [this](https://github.com/AMP-SCZ/utility/blob/f84e3d5a211d5e10020c670994dd78e79f07fb17/dpdash_ci_cd/dpdash_ci_cd.sh#L22-L29) method of `mongoimport` no longer works. The new method is: @@ -145,9 +151,6 @@ The trailing JSONs can be obtained from rc-predict.partners.org's `mongoexport`. -``` - -``` ### 2. Importing data From f66741c53e51acf9d80ded1b4c78562acde592a6 Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Thu, 16 Oct 2025 11:37:04 -0400 Subject: [PATCH 7/8] remove Excluded: 0 This change removed Included: 1 but forgot to remove the above: https://github.com/AMP-SCZ/dpdash/commit/49dad1329b0973cf8972c0c49b618289d294374a Co-authored-by: Dheshan --- server/services/FiltersService/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/server/services/FiltersService/index.js b/server/services/FiltersService/index.js index a9b12570..dd8eb500 100644 --- a/server/services/FiltersService/index.js +++ b/server/services/FiltersService/index.js @@ -10,7 +10,6 @@ export const FILTER_TO_MONGO_VALUE_MAP = { Missing: null, Recruited: 'recruited', 'Not recruited': 'not recruited', - Excluded: 0, Male: 1, Female: 2, } From 2c574201bd9573b998954206f2f63a1d984b22a0 Mon Sep 17 00:00:00 2001 From: "Billah, Tashrif" <35086881+tashrifbillah@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:49:59 -0400 Subject: [PATCH 8/8] typo --- ON_PREM_DEPLOYMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ON_PREM_DEPLOYMENT.md b/ON_PREM_DEPLOYMENT.md index 1f386522..e5332453 100644 --- a/ON_PREM_DEPLOYMENT.md +++ b/ON_PREM_DEPLOYMENT.md @@ -122,7 +122,7 @@ Nginx Proxy Manager should not be exposed to the internet. It is recommended to Find the container ID of the mongo container with `docker ps` and then run `docker exec -it /bin/bash` to get a terminal within the container. From there you can run `mongosh` to connect to the database. -Alternatively, you an download [mongosh](https://www.mongodb.com/try/download/shell) and connect directly as: +Alternatively, you can download [mongosh](https://www.mongodb.com/try/download/shell) and connect directly as: ``` mongosh "mongodb://127.0.0.1:27017/dpdmongo?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.3.8"