mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(mailhog): use docker network address in containers (#54877)
This commit is contained in:
committed by
GitHub
parent
5ae52fdef9
commit
6fe2b0811f
@@ -1,6 +1,7 @@
|
||||
import nodemailer, { Transporter } from 'nodemailer';
|
||||
|
||||
import { MailProvider, SendEmailArgs } from '../mailer';
|
||||
import { MAILHOG_HOST } from '../../utils/env';
|
||||
|
||||
/**
|
||||
* NodemailerProvider is a wrapper around nodemailer that provides a clean
|
||||
@@ -15,7 +16,7 @@ export class NodemailerProvider implements MailProvider {
|
||||
*/
|
||||
constructor() {
|
||||
this.transporter = nodemailer.createTransport({
|
||||
host: 'localhost',
|
||||
host: MAILHOG_HOST,
|
||||
secure: false,
|
||||
port: 1025,
|
||||
auth: {
|
||||
|
||||
@@ -104,6 +104,7 @@ if (process.env.FREECODECAMP_NODE_ENV !== 'development') {
|
||||
}
|
||||
|
||||
export const HOME_LOCATION = process.env.HOME_LOCATION;
|
||||
export const MAILHOG_HOST = process.env.MAILHOG_HOST ?? 'localhost';
|
||||
export const MONGOHQ_URL =
|
||||
process.env.NODE_ENV === 'test'
|
||||
? createTestConnectionURL(
|
||||
|
||||
Reference in New Issue
Block a user