diff --git a/2024.12/apache/Dockerfile b/2024.12/apache/Dockerfile index b10c55a..198593d 100644 --- a/2024.12/apache/Dockerfile +++ b/2024.12/apache/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ + sudo \ rsync \ bzip2 \ # For mail() support diff --git a/2024.12/apache/entrypoint.sh b/2024.12/apache/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2024.12/apache/entrypoint.sh +++ b/2024.12/apache/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2024.12/fpm-alpine/entrypoint.sh b/2024.12/fpm-alpine/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2024.12/fpm-alpine/entrypoint.sh +++ b/2024.12/fpm-alpine/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2024.12/fpm/Dockerfile b/2024.12/fpm/Dockerfile index cf2e8df..a9d54b2 100644 --- a/2024.12/fpm/Dockerfile +++ b/2024.12/fpm/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ + sudo \ rsync \ bzip2 \ # For mail() support diff --git a/2024.12/fpm/entrypoint.sh b/2024.12/fpm/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2024.12/fpm/entrypoint.sh +++ b/2024.12/fpm/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2026.01/apache/Dockerfile b/2026.01/apache/Dockerfile index 61f0fe7..c01d2ef 100644 --- a/2026.01/apache/Dockerfile +++ b/2026.01/apache/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ + sudo \ rsync \ bzip2 \ # For mail() support diff --git a/2026.01/apache/entrypoint.sh b/2026.01/apache/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2026.01/apache/entrypoint.sh +++ b/2026.01/apache/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2026.01/fpm-alpine/entrypoint.sh b/2026.01/fpm-alpine/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2026.01/fpm-alpine/entrypoint.sh +++ b/2026.01/fpm-alpine/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2026.01/fpm/Dockerfile b/2026.01/fpm/Dockerfile index 105068e..28ae5be 100644 --- a/2026.01/fpm/Dockerfile +++ b/2026.01/fpm/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ + sudo \ rsync \ bzip2 \ # For mail() support diff --git a/2026.01/fpm/entrypoint.sh b/2026.01/fpm/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2026.01/fpm/entrypoint.sh +++ b/2026.01/fpm/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2026.04-dev/apache/Dockerfile b/2026.04-dev/apache/Dockerfile index d95ef67..038faef 100644 --- a/2026.04-dev/apache/Dockerfile +++ b/2026.04-dev/apache/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ + sudo \ rsync \ bzip2 \ # For mail() support diff --git a/2026.04-dev/apache/entrypoint.sh b/2026.04-dev/apache/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2026.04-dev/apache/entrypoint.sh +++ b/2026.04-dev/apache/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2026.04-dev/fpm-alpine/entrypoint.sh b/2026.04-dev/fpm-alpine/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2026.04-dev/fpm-alpine/entrypoint.sh +++ b/2026.04-dev/fpm-alpine/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/2026.04-dev/fpm/Dockerfile b/2026.04-dev/fpm/Dockerfile index f7c22f2..9ae1e11 100644 --- a/2026.04-dev/fpm/Dockerfile +++ b/2026.04-dev/fpm/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ + sudo \ rsync \ bzip2 \ # For mail() support diff --git a/2026.04-dev/fpm/entrypoint.sh b/2026.04-dev/fpm/entrypoint.sh index b080cef..b5f93c9 100755 --- a/2026.04-dev/fpm/entrypoint.sh +++ b/2026.04-dev/fpm/entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 7b35be6..a04a165 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -5,6 +5,7 @@ RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ + sudo \ rsync \ bzip2 \ # For mail() support diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b080cef..b5f93c9 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -39,8 +39,16 @@ file_env() { unset "$fileVar" } +# initialize the email configuration sh /setup_msmtp.sh +# ensure we have a logfile writeable by www-data +FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log} +if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then + touch "$FRIENDICA_LOGFILE" + chown www-data:www-data "$FRIENDICA_LOGFILE" +fi + # just check if we execute apache or php-fpm if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then if [ -n "${REDIS_HOST+x}" ]; then