erseco / alpine-moodle

Moodle docker image based on Alpine Linux
https://hub.docker.com/r/erseco/alpine-moodle
MIT License
42 stars 33 forks source link

Add mailhog support to docker-compose.yml example #28

Closed aleciavogel closed 1 year ago

aleciavogel commented 1 year ago

This took me longer than I'd like to admit to figure out how to properly integrate MailHog into one of my own projects' dev environments, so I thought I'd save someone the time and add MailHog to the example docker-compose.yml.

MailHog will catch all outgoing mail from Moodle so that you can easily debug/troubleshoot without worrying about actually sending emails or accidentally exposing your SMTP credentials in your codebase.

Also fixed a merge conflict in the README.

erseco commented 1 year ago

Hi @aleciavogel,

Thanks for your contribution! The addition of MailHog support to the example docker-compose.yml is a thoughtful enhancement. This will undoubtedly be a great help in debugging and troubleshooting, especially in preventing accidental exposure of SMTP credentials.

I appreciate the time you took to integrate MailHog into the alpine-moodle project and for taking a step further to share this with the community. Your effort to resolve the merge conflict in the README is also recognized and appreciated.

Before we merge this, I'll run some tests to ensure everything works as expected. I'll get back to you soon.

Thanks again for your contribution!

Best

erseco commented 1 year ago

Hi @aleciavogel,

Thanks again for your valuable contribution. However, after reviewing the MailHog project, it seems to be inactive, as indicated in this issue: https://github.com/mailhog/MailHog/issues/442. This could potentially lead to support and maintenance issues down the line.

Considering this, what are your thoughts on integrating "maildev" instead, as suggested in the aforementioned issue? You can find more about it here: https://maildev.github.io/maildev/. It appears to be actively maintained and could serve the same purpose effectively.

Please let me know your thoughts on this proposed change.

Thanks again for your input and looking forward to your response.

Best

aleciavogel commented 1 year ago

Hey Ernesto,

Thank you for your consideration and thoughtful responses! MailHog has always been my go-to but MailDev sure looks neat. I'll revise my PR to use MailDev instead!

aleciavogel commented 1 year ago

Unfortunately, I can't seem to get MailDev to work with your image and it's not immediately apparent as to why it's not working. I've consulted the issues for the MailDev repo to see if anyone has encountered something similar. I've tried switching between "tls" and "tcp" for the protocol env variable in the moodle service to no avail, as well as setting incoming and outgoing usernames and passwords for MailDev. Even if I don't get an error upon sending the "Lost your password?" email, it never shows up in the MailDev UI.

Feel free to take a crack at it