Add support for email with msmtp
This commit is contained in:
rodzic
5ee52eb5a1
commit
e038483e69
@ -1,7 +1,7 @@
|
||||
FROM debian:stable
|
||||
|
||||
RUN apt-get -y update && apt-get -y install nginx php-fpm php-mysql php-apcu php-mbstring php-xml supervisor python-pip \
|
||||
mysql-client imagemagick curl wget zip unzip php-pclzip git
|
||||
mysql-client imagemagick curl wget zip unzip php-pclzip git msmtp msmtp-mta
|
||||
RUN pip install supervisor-stdout
|
||||
|
||||
ENV MW_VERSION REL1_31
|
||||
|
16
configuration/msmtprc
Normal file
16
configuration/msmtprc
Normal file
@ -0,0 +1,16 @@
|
||||
defaults
|
||||
auth on
|
||||
tls on
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
logfile /var/log/msmtp.log
|
||||
|
||||
account email
|
||||
host @GCL_SMTP_HOST@
|
||||
port @GCL_SMTP_PORT@
|
||||
from @GCL_SMTP_FROM@
|
||||
user @GCL_SMTP_USER@
|
||||
password @GCL_SMTP_PASSWORD@
|
||||
...
|
||||
|
||||
# Set a default account
|
||||
account default : email
|
@ -28,3 +28,6 @@ services:
|
||||
GCL_FORUMS_URL: http://localhost:8001/forums
|
||||
GCL_WIKI_URL: http://localhost:8001/wiki
|
||||
GCL_MEMCACHED_HOST: cache
|
||||
GCL_SMTP_HOST: mail.gandi.net
|
||||
GCL_SMTP_USER: no-reply@monarch-pass.net
|
||||
#GCL_SMTP_PASSWORD: smtp-password-here
|
||||
|
@ -22,6 +22,18 @@ ln -sf /userdata/profile_pictures /application/forums/profile_pictures
|
||||
rm -rf /application/forums/pm_attachments
|
||||
ln -sf /userdata/pm_attachments /application/forums/pm_attachments
|
||||
|
||||
# Configure email
|
||||
cp /configuration/msmtprc /etc/msmtprc
|
||||
sed -i "s/@GCL_SMTP_HOST@/$GCL_SMTP_HOST/g" /etc/msmtprc
|
||||
|
||||
SMTP_PORT=${GCL_SMTP_PORT:-587}
|
||||
sed -i "s/@GCL_SMTP_PORT@/$SMTP_PORT/g" /etc/msmtprc
|
||||
|
||||
SMTP_FROM=${GCL_SMTP_FROM:-no-reply@glitchcity.info}
|
||||
sed -i "s/@GCL_SMTP_FROM@/$SMTP_FROM/g" /etc/msmtprc
|
||||
sed -i "s/@GCL_SMTP_USER@/$GCL_SMTP_USER/g" /etc/msmtprc
|
||||
sed -i "s/@GCL_SMTP_PASSWORD@/$GCL_SMTP_PASSWORD/g" /etc/msmtprc
|
||||
|
||||
# Run maintenance scripts
|
||||
cd /application/w/maintenance
|
||||
php update.php
|
||||
|
Ładowanie…
x
Reference in New Issue
Block a user