build upon the wordpress Docker image to add mail forwarding to the host using msmtp
This commit is contained in:
parent
d7548f937e
commit
47c4e39b73
4 changed files with 20 additions and 2 deletions
|
@ -7,11 +7,11 @@
|
|||
|
||||
* [Dockerise your PHP app with PHP-FPM and nginx](http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm/)
|
||||
|
||||
nginx and PHP-FPM both need access to the files--at the same location. It's thus not easy to have a single nginx serving multiple PHP-FPM containers. You always need a webserver in the same container as PHP-FPM.
|
||||
nginx and PHP-FPM both need access to the files--at the same location. It's thus not easy to have a single nginx serving multiple PHP-FPM containers. You always need a webserver in the same container as PHP-FPM.
|
||||
|
||||
### Alternatives
|
||||
|
||||
* [WP multisite + Caddy](https://skippy.net/caddy-docker-php-wordpress): arguments against using the Wordpress Docker image, keeps the whole wp install outside the image, and instead focuses on properly configuring PHP-FPM. Has the advantage of being reusable for other PHP projects. Is well argumented.
|
||||
* [WP multisite + Caddy](https://skippy.net/caddy-docker-php-wordpress): arguments against using the Wordpress Docker image, keeps the whole wp install outside the image, and instead focuses on properly configuring PHP-FPM. Has the advantage of being reusable for other PHP projects. Is well argumented. Tackles file access rights and mailing (ssmtp), it's a good source!
|
||||
|
||||
#### Which webserver?
|
||||
|
||||
|
|
10
wordpress/php/Dockerfile
Normal file
10
wordpress/php/Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM wordpress:apache
|
||||
|
||||
RUN apt-get update; \
|
||||
apt-get install -y --no-install-recommends msmtp; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN echo "sendmail_path = /usr/sbin/msmtp -t " > /usr/local/etc/php/conf.d/sendmail.ini
|
||||
|
||||
COPY ./msmtprc /etc/msmtprc
|
||||
|
1
wordpress/php/TODO
Normal file
1
wordpress/php/TODO
Normal file
|
@ -0,0 +1 @@
|
|||
Add this to an Ansible role executing the templates to add the propoer IP, notably to msmtprc
|
7
wordpress/php/msmtprc.j2
Normal file
7
wordpress/php/msmtprc.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
defaults
|
||||
|
||||
account default
|
||||
host {{ host_ip }}
|
||||
post 25
|
||||
|
||||
|
Loading…
Reference in a new issue