EFForg / check-your-reps

Other
0 stars 0 forks source link

mailserver config hardcoded in Dockerfile #176

Open starchy opened 5 years ago

starchy commented 5 years ago

https://github.com/EFForg/check-your-reps/blob/master/Dockerfile includes

&& echo "www-data:no-reply@eff.org:mail2.eff.org:587" > /etc/ssmtp/revaliases

If someone outside the organization builds this image without changing the Dockerfile, they will attempt to relay mail through EFF's mailservers. Depending on other factors, this will either fail outright or just be really confusing.

This should probably be broken out into an environment variable or a separate config file.

vbrown608 commented 5 years ago

Setting the contents of that file from an environment variable after the build is a little tricky because the Docker user no longer has root access.

I know techops has its own processes for managing production compose files - what do you think about volume-ing /etc/ssmtp/revaliases into the container on production?

FWIW, this Docker setup isn't designed to support local development.

starchy commented 5 years ago

That would be an improvement, but also checkout our internal postfix container for how we're using environment variables there in case that's easy to port to ssmtp.

If this isn't designed for local development, it might also be worth considering a documentation update.