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 diff --git a/ON_PREM_DEPLOYMENT.md b/ON_PREM_DEPLOYMENT.md index 0a8d7e1c..e5332453 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 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" +``` + ### 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 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 diff --git a/server/mailer/BaseMailer.js b/server/mailer/BaseMailer.js index b135a2ac..df856c6e 100644 --- a/server/mailer/BaseMailer.js +++ b/server/mailer/BaseMailer.js @@ -22,6 +22,11 @@ export default class BaseMailer { user: process.env.SMTP_USER, pass: process.env.SMTP_PASS, }, + tls: { + // to not fail on invalid certs: + // set SMTP_REJECT_UNAUTHORIZED=false in .env file + rejectUnauthorized: process.env.SMTP_REJECT_UNAUTHORIZED == 'true', + }, }) return await transporter.sendMail({ 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, }