Improve email set-up
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
5f2697c0c9
commit
e6dc753365
|
@ -47,5 +47,14 @@ _(Only tested using subdomains)_
|
||||||
2. `direnv allow`
|
2. `direnv allow`
|
||||||
3. `abra deploy`
|
3. `abra deploy`
|
||||||
|
|
||||||
|
## Email
|
||||||
|
|
||||||
|
1. Deploy `postfix-relay`
|
||||||
|
2. Edit `.envrc` and uncomment the email lines; change `MAIL_FROM` to make sure
|
||||||
|
the domain is the same as `postfix-relay`'s `$DOMAIN` or in its
|
||||||
|
`$EXTRA_SENDER_DOMAINS`
|
||||||
|
3. `direnv allow` (or `source .envrc`)
|
||||||
|
7. `abra deploy`
|
||||||
|
|
||||||
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||||
[compose-traefik]: https://git.autonomic.zone/compose-stacks/traefik
|
[compose-traefik]: https://git.autonomic.zone/compose-stacks/traefik
|
||||||
|
|
|
@ -3,17 +3,17 @@ version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
wordpress:
|
wordpress:
|
||||||
entrypoint: /docker-entrypoint2.sh
|
entrypoint: /docker-entrypoint.sh
|
||||||
environment:
|
environment:
|
||||||
- SMTP_HOST=${SMTP_HOST}
|
- SMTP_HOST=${SMTP_HOST}
|
||||||
|
- MAIL_FROM=${MAIL_FROM}
|
||||||
networks:
|
networks:
|
||||||
- mail
|
- mail
|
||||||
configs:
|
configs:
|
||||||
- source: entrypoint_mailrelay_conf
|
|
||||||
target: /docker-entrypoint2.sh
|
|
||||||
mode: 0555
|
|
||||||
- source: mstmp_conf
|
- source: mstmp_conf
|
||||||
target: /etc/msmtprc
|
target: /etc/msmtprc
|
||||||
|
- source: entrypoint
|
||||||
|
target: /etc/msmtprc
|
||||||
mode: 0555
|
mode: 0555
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
@ -25,7 +25,7 @@ configs:
|
||||||
name: ${STACK_NAME}_mstmp_conf_${MSMTP_CONF_VERSION}
|
name: ${STACK_NAME}_mstmp_conf_${MSMTP_CONF_VERSION}
|
||||||
file: msmtp.conf.tmpl
|
file: msmtp.conf.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
entrypoint_mailrelay_conf:
|
entrypoint_conf:
|
||||||
name: ${STACK_NAME}_entrypoint_mailrelay_${ENTRYPOINT_MAILRELAY_CONF_VERSION}
|
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_CONF_VERSION}
|
||||||
file: entrypoint.mailrelay.sh.tmpl
|
file: entrypoint.sh.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y msmtp && rm -rf /var/lib/apt/lists/*
|
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y msmtp && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "sendmail_path = /usr/bin/msmtp -t -i" >> /usr/local/etc/php/conf.d/sendmail.ini
|
echo "sendmail_path = /usr/bin/msmtp -t -i" > /usr/local/etc/php/conf.d/sendmail.ini
|
||||||
|
|
||||||
# Upstream ENTRYPOINT
|
# Upstream ENTRYPOINT
|
||||||
# https://github.com/docker-library/wordpress/blob/master/php7.4/apache/Dockerfile#L120
|
# https://github.com/docker-library/wordpress/blob/master/php7.4/apache/Dockerfile#L120
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
account default
|
account default
|
||||||
host {{ env "SMTP_HOST" }}
|
host {{ env "SMTP_HOST" }}
|
||||||
auto_from on
|
from {{ env "MAIL_FROM" }}
|
||||||
|
|
Loading…
Reference in New Issue