TrafeX / docker-php-nginx

Docker image with PHP-FPM 8.3 & Nginx 1.24 on Alpine Linux
https://hub.docker.com/r/trafex/php-nginx
MIT License
1.33k stars 721 forks source link

added ssmtp to the image #142

Closed imp1sh closed 10 months ago

imp1sh commented 10 months ago

now sendmail is present and uses a configuration you can mount e.g. /mycontainer/nginx-php/ssmtp/ssmtp.conf:/etc/ssmtp/ssmtp.conf that way sending emails via the website will be possible

imp1sh commented 10 months ago

I added this and tested it successfully. If you wanna try: docker.io/junicast/php-nginx:3.3.0

TrafeX commented 10 months ago

Hi @imp1sh, thank you for your effort! However, since this container functions as a minimal example to get a Nginx + PHP-FPM container running I can't include every package in the base configuration. Instead, I started to add more documentation to this repo with all the examples people are asking or contributing. I've described ssmtp support here: https://github.com/TrafeX/docker-php-nginx/blob/master/docs/sending-emails.md Feel free to update it or add more examples!

imp1sh commented 10 months ago

Hi @TrafeX would this not mean everyone who needs something extra would need to make their own build? I believe a webserver needs a way to send off emails, this is basic functionality and should be added to the image. It's not like I asked for adding a full MTA but a tiny userspace application that is also optional to use.

TrafeX commented 10 months ago

Hi @imp1sh,

That's correct, I don't believe in a one size fits all solution. And everything you add that you don't need gives a bit of overhead and can introduce security vulnerabilities. You see sending email via a locally installed MTA as basic functionality, but there are lots of alternatives like using an Email Service Provider directly from your web application. That's why I don't want to include this by default, but instead offer people the option to install it in their own copy of this image.