mirror of
https://github.com/friendica/docker
synced 2025-01-24 03:47:32 +01:00
Philipp Holzer
8493e35da4
- upgrade version - fixing alpine Dockerfile (openssl to libressl) - adding examples for SSMTP - README updates & bugfixing - Removed shell-script "friendica" - Removed old .htconfig - Adding SMTP example - Upgrading docker-compose files - Added upgrade.exclude list
41 lines
1.2 KiB
Docker
41 lines
1.2 KiB
Docker
FROM friendica/server:fpm
|
|
|
|
# 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/
|