2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2026-01-08 06:37:58 +01:00

Move SSMTP to image again & just exclude local.ini.php from rsync

This commit is contained in:
Philipp Holzer 2018-10-05 20:05:27 +02:00
commit 2e71bd0c90
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
31 changed files with 304 additions and 269 deletions

View file

@ -1,41 +1,4 @@
FROM friendica/server:apache
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
# For mail() support
ssmtp \
; \
rm -rf /var/lib/apt/lists/*;
ENV SMTP localhost
ENV SMTP_FROM no-reply
ENV SITENAME "Testsite"
# Setup SSMTP
RUN set -ex; \
sed -i "s/:root:/:${SITENAME}:/g" /etc/passwd ;\
sed -i "s/:Linux\ User:/:${SITENAME}:/g" /etc/passwd ;\
# add possible mail-senders
{\
echo "www-data:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
echo "root:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
} > /etc/ssmtp/revaliases;\
# replace ssmtp.conf settings
{\
echo "root=$SMTP_FROM@$HOSTNAME" ;\
echo "hostname=$HOSTNAME" ;\
echo "mailhub=$SMTP" ;\
echo "FromLineOverride=YES" ;\
[ -z "$SMTP_TLS" ] || echo "UseTLS=$SMTP_TLS" ;\
[ -z "$SMTP_STARTTLS" ] || echo "UseSTARTTLS=$SMTP_STARTTLS" ;\
[ -z "$SMTP_AUTH_USER" ] || echo "AuthUser=$SMTP_AUTH_USER" ;\
[ -z "$SMTP_AUTH_PASS" ] || echo "AuthPass=$SMTP_AUTH_PASS" ;\
[ -z "$SMTP_AUTH_METHOD" ] || echo "AuthMethod=$SMTP_AUTH_METHOD" ;\
} > /etc/ssmtp/ssmtp.conf;
RUN mkdir -p /usr/src/config
COPY addon.ini.php /usr/src/config/

View file

@ -1,4 +1,4 @@
MYSQL_PASSWORD=
MYSQL_PASSWORD=test
MYSQL_DATABASE=friendica
MYSQL_USER=friendica
MYSQL_HOST=db

View file

@ -22,10 +22,10 @@ services:
- friendica:/var/www/html
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
- SITENAME=
- SMTP=
- FRIENDICA_TZ=Europe/Berlin
- FRIENDICA_LANG=de
- SITENAME=Testsite
- SMTP=smtp.philipp.info
env_file:
- db.env
depends_on:
@ -40,9 +40,6 @@ services:
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- SITENAME=
- SMTP=
depends_on:
- db
hostname: friendica.local