docker-django-example
docker-django-example copied to clipboard
Any interest in adding Sentry and/or Mailhog services?
cookiecutter-django includes sentry and mailhog for development. Perhaps these could be included in your setup?
Hi,
I've thought about it a little bit when it comes to adding Sentry. I like the idea of adding it since some type of error reporting tool is common amongst applications running in production. What stopped me from adding it sooner is folks might want to use Honeybadger as an alternative or keep it simple by emailing exceptions out which is something someone might do as a solo developer in a side project.
I didn't like the idea of supporting all 3 with a form of templating and generators so I kind of defaulted at none and leaving it up to the app creator to pick a solution afterwards but I do agree having an opinion and picking one is quite nice when the choice aligns with what you want to use.
For something like Mailhog I didn't even know this tool existed. If this were to be implemented I think it should run as a container in the override file since it's only something that'll run in development. I also wonder how it integrates with Pytest to be able to test deliverability and email templates, etc.. Have you used it first hand with Django, Flask or any other framework?
OK, I understand your thinking on adding sentry.
As for mailhog, I haven't used it yet for django development and just recently discovered it too. I'm evaluating a few different dockized Django setups and plan to use mailhog for email testing in development. It's on dockerhub so it should be fairly easy to add this to docker-compose.
Perhaps someone else has experience with mailhog and pytest?
I've been using MailCatcher now for a while, it's similar to Mailhog.
I made a video about it a few months ago at: https://nickjanetakis.com/blog/self-host-and-preview-emails-locally-with-mailcatcher-open-source
I can maybe see it being included in this example app at some point. It's really useful. My only hesitation is it's only useful if you send emails in your project. To be fair most apps will probably have the idea of users which in turn likely means email but unlike cookiecutter-django, there's no optional choices here. It's a generated project so it would need to be included for everyone. Funny enough tho, removing it is faster than adding it so it still does feel worth it.
If anyone else has any feedback that would be appreciated.
@nickjj mailpit is also a better option.