2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2026-01-02 13:03:34 +01:00

Improvements and Examples

- Adding `sendmail` feature to `apache` and `fpm`
- Adding section `.examples/dockerfiles`
- Adding section `.examples/dockerfiles/cron` to combine app & external cron-jobs
- Adding section `.examples/dockerfiles/smtp` for further SMTP-settings
This commit is contained in:
Philipp Holzer 2018-05-20 15:44:03 +02:00
commit 0826aaefa9
No known key found for this signature in database
GPG key ID: 58160D7D6AF942B6
35 changed files with 434 additions and 26 deletions

View file

@ -13,6 +13,8 @@ RUN set -ex; \
bzip2 \
busybox-static \
git \
# For mail() support
sendmail \
; \
rm -rf /var/lib/apt/lists/*; \
\
@ -93,6 +95,10 @@ RUN a2enmod rewrite remoteip ;\
} > /etc/apache2/conf-available/remoteip.conf;\
a2enconf remoteip
RUN {\
echo sendmail_path = "/usr/sbin/sendmail -t -i" ;\
} > /usr/local/etc/php/conf.d/sendmail.ini;
ENV FRIENDICA_VERSION develop
ENV ADDONS_VERSION develop

View file

@ -30,6 +30,9 @@ clone_develop() {
echo "Cloning Friendica '${friendica}' with Addons '${addons}' into '${dir}'"
# Removing the whole directory first
rm -fr ${dir}/friendica
git clone -b ${friendica} https://github.com/friendica/friendica ${dir}/friendica
chmod 777 ${dir}/friendica/view/smarty3
mkdir ${dir}/friendica/addon
@ -139,6 +142,20 @@ update() {
console "dbstructure update"
}
sendmail() {
if [ ! -f /etc/init.d/sendmail ]; then
# If sendmail isn't installed, exit this method
return
fi
line=$(head -n 1 /etc/hosts)
line2=$(echo $line | awk '{print $2}')
echo "$line $line2.localdomain" >> /etc/hosts
echo "Starting sendmail for Mail-Support"
/etc/init.d/sendmail start
}
if [ $# -eq 0 ]; then
friendica_help
fi
@ -148,5 +165,6 @@ case "$1" in
update) shift; update "$@" ;;
console) shift; console "$@" ;;
composer) shift; composer "$@" ;;
sendmail) shift; sendmail "$@" ;;
*) friendica_help ;;
esac

View file

@ -1,4 +1,4 @@
#!/bin/sh
set -eu
exec busybox crond -f -l 0 -L /dev/stdout
exec busybox crond -f -l 0 -L /dev/stdout

View file

@ -3,5 +3,6 @@ set -eu
# Check if Friendica needs to get installed
friendica install
friendica sendmail
exec "$@"
exec "$@"