Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDT24-45 | Fix Docker Hot-Reloading #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

PDT24-45 | Fix Docker Hot-Reloading #11

wants to merge 3 commits into from

Conversation

noxiousghost
Copy link
Collaborator

Tasks

Changes

  • Added volume property for application container in docker-compose file to enable hot-reloading when running the application from container.
  • Added auto-generated ormconfig.json file in gitignore

arjandhakal
arjandhakal previously approved these changes Dec 31, 2024
* feat: add logging service with winston

* chore(logging): use and fix logging information

* PDT24-34 | Configure nodemailer service (#12)

* feat: configure nodemailer servie for sending email

* feat: create a basic email template for sending signup otp code

* chore: rename param names and add function documentation

* fix: use secure mailing port

* refactor: remove sendEmail call from main and improve sendEmail method

* refactor: remove ternary operator
Copy link

@rrojan rrojan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job - there are a few potential areas of improvement but apart from that, awesome.

Comment on lines +12 to +13
new transports.File({ filename: 'logs/errors.log', level: 'error' }),
new transports.File({ filename: 'logs/all.log' }),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use { flags: 'a' } to append to log file instead of overwriting it on each rebuild.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that the existing code (without flags: 'a') works just fine. It doesn't overwrite the log files on each rebuild. so I am leaving as it is

),
transports: isProduction
? [
new transports.File({ filename: 'logs/errors.log', level: 'error' }),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, store logs for different dates in different log files.

E.g. errors_2024-12-32.log

To stay clear of potential timezone issues, use server time or UTC.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this we'd have to install an additional package called winston-daily-rotate-file. Do you recommend to do so?

Comment on lines +21 to +23
from: sender ?? {
name: process.env.EMAIL_SENDER_NAME as string,
address: process.env.EMAIL_USER as string,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can define this as a constant somewhere with Address type so it can be reused across your MailerModule

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead, i removed sender as it will be constant across the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants