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

Should Mailhog be converted to run as a global shared service? #175

Closed
davidalger opened this issue Jul 2, 2020 · 1 comment
Closed
Labels
enhancement New feature or request
Milestone

Comments

@davidalger
Copy link
Collaborator

davidalger commented Jul 2, 2020

Currently each environment runs it's own Mailhog container to capture emails relayed via SMTP. This seems quite redundant and inefficient when spinning environments up and down.

The idea here is that Mailhog would run as a shared global service in like manner to Traefik, Portainer, etc. It would be peered with each project network (just like Traefik is) allowing php-fpm containers to continue sending email to mailhog on port 1025 (i.e. there should be zero re-configuration of application configuration for this to work).

Implementing this change would have mailhog service spun up when warden svc up (formerly warden up) is run and would obsolete the WARDEN_MAILHOG flag in per-project .env files as it would no longer have a purpose.

Users who do not want to run Mailhog for any of their projects (despite it being very lightweight) could be empowered to turn it off by implementing a similar flag in the global service .env file typically found at ~/.warden/.env PHP-FPM images are built with mhsendmail pre-configured to route outbound emails to mailhog:1025 and overriding this based on a global svc presence indicator would be difficult, so implementing a global flag to avoid running mailhog at all is unlikely at this time.

Any thoughts on this front are welcome. Should there be no opposition to the idea, it will likely be explored in context of 0.7.0 release (timeline tbd).

@davidalger davidalger added the enhancement New feature or request label Jul 2, 2020
@davidalger davidalger added this to the Warden 0.7.0 milestone Jul 6, 2020
@davidalger
Copy link
Collaborator Author

This has been implemented in commit 12d8452 and has been working well. The change will be published in the upcoming 0.7.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant