pytition / Pytition

Django app for self-hosted privacy-friendly online petitions
https://pytition.org
BSD 3-Clause "New" or "Revised" License
99 stars 28 forks source link

Add Fake SMTP server to docker-compose? #231

Closed pnu-s closed 4 years ago

pnu-s commented 4 years ago

Hello there!

When getting a development instance up, I noticed that some features are not working due to the absence of SMTP server (e.g. signing a petition).

I was wondering whether it would make sense to add a fake SMTP server directly to the docker-compose (such as Maildev which is made for that).

We could make 2 docker compose files, one with maildev and one without if some people want to start their instance without this fake SMTP.

WDYT?

I tried to take a look but could not easily find how the SMTP server connection is configured.

fallen commented 4 years ago

That looks like a good idea. I guess we can just ship the docker compose env with Maildev, since docker (in my opinion) is a development environment and not a production one.

To connect Pytition to Maildev isn't it enough to just set those variables in Django settings https://docs.djangoproject.com/fr/3.0/topics/email/#smtp-backend ?

pnu-s commented 4 years ago

Ok, I'll try to take a look at this in the next days ;)

fallen commented 4 years ago

Awesome! Thanks a lot :)