Loading config/logrotate/nextcloud-syslog-ng 0 → 100644 +10 −0 Original line number Diff line number Diff line /var/log/nextcloud/nextcloud-syslog.log { size 16M rotate 5 missingok notifempty compress delaycompress copytruncate create 0644 root root } config/syslog-ng/syslog-ng.conf +11 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,16 @@ source s_local { internal(); }; destination d_local { file( "/var/log/nextcloud/nextcloud-syslog.log" create-dirs(yes) dir-perm(0755) perm(0644) template("$ISODATE $HOST $PROGRAM[$PID]: $MSG\n") ); }; filter f_nextcloud { program("${NEXTCLOUD_SYSLOG_TAG}"); }; Loading @@ -26,5 +36,6 @@ destination d_remote { log { source(s_local); filter(f_nextcloud); destination(d_local); destination(d_remote); }; custom_entrypoint-slim.sh +9 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,15 @@ if [ -n "${SYSLOG_HOST}" ]; then /etc/syslog-ng/syslog-ng.conf syslog-ng --no-caps echo "syslog-ng started." # Rotate local syslog-ng file output (max 16MB) hourly if command -v logrotate >/dev/null 2>&1 && [ -f /etc/logrotate.conf ]; then ( while true; do logrotate /etc/logrotate.conf || true sleep "${LOGROTATE_INTERVAL:-3600}" done ) & echo "logrotate timer started." fi fi /entrypoint.sh "$@" slim.Dockerfile +2 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ RUN rm -rf ${BASE_DIR}/core/skeleton/* ${BASE_DIR}/themes/example \ && mkdir -p ${BASE_DIR}/themes/Murena COPY --chown=www-data:www-data samples/onlyoffice/ ${BASE_DIR}/core/skeleton/Documents/ RUN apt-get update && apt-get install -y unzip ffmpeg syslog-ng RUN apt-get update && apt-get install -y unzip ffmpeg syslog-ng logrotate # Murena apps RUN curl -sL ${CONTACTS_URL} | tar xzf - -C ${BASE_DIR}/custom_apps Loading Loading @@ -64,6 +64,7 @@ RUN rsync -rLDog --chown www-data:www-data --delete --exclude-from=/upgrade.excl && rsync -rLDog --chown www-data:www-data --include "version.php" --include "/custom_apps/" --include "/themes/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ COPY config/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf COPY config/logrotate/nextcloud-syslog-ng /etc/logrotate.d/nextcloud-syslog-ng ENTRYPOINT ["/custom_entrypoint-slim.sh"] CMD ["php-fpm"] Loading Loading
config/logrotate/nextcloud-syslog-ng 0 → 100644 +10 −0 Original line number Diff line number Diff line /var/log/nextcloud/nextcloud-syslog.log { size 16M rotate 5 missingok notifempty compress delaycompress copytruncate create 0644 root root }
config/syslog-ng/syslog-ng.conf +11 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,16 @@ source s_local { internal(); }; destination d_local { file( "/var/log/nextcloud/nextcloud-syslog.log" create-dirs(yes) dir-perm(0755) perm(0644) template("$ISODATE $HOST $PROGRAM[$PID]: $MSG\n") ); }; filter f_nextcloud { program("${NEXTCLOUD_SYSLOG_TAG}"); }; Loading @@ -26,5 +36,6 @@ destination d_remote { log { source(s_local); filter(f_nextcloud); destination(d_local); destination(d_remote); };
custom_entrypoint-slim.sh +9 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,15 @@ if [ -n "${SYSLOG_HOST}" ]; then /etc/syslog-ng/syslog-ng.conf syslog-ng --no-caps echo "syslog-ng started." # Rotate local syslog-ng file output (max 16MB) hourly if command -v logrotate >/dev/null 2>&1 && [ -f /etc/logrotate.conf ]; then ( while true; do logrotate /etc/logrotate.conf || true sleep "${LOGROTATE_INTERVAL:-3600}" done ) & echo "logrotate timer started." fi fi /entrypoint.sh "$@"
slim.Dockerfile +2 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ RUN rm -rf ${BASE_DIR}/core/skeleton/* ${BASE_DIR}/themes/example \ && mkdir -p ${BASE_DIR}/themes/Murena COPY --chown=www-data:www-data samples/onlyoffice/ ${BASE_DIR}/core/skeleton/Documents/ RUN apt-get update && apt-get install -y unzip ffmpeg syslog-ng RUN apt-get update && apt-get install -y unzip ffmpeg syslog-ng logrotate # Murena apps RUN curl -sL ${CONTACTS_URL} | tar xzf - -C ${BASE_DIR}/custom_apps Loading Loading @@ -64,6 +64,7 @@ RUN rsync -rLDog --chown www-data:www-data --delete --exclude-from=/upgrade.excl && rsync -rLDog --chown www-data:www-data --include "version.php" --include "/custom_apps/" --include "/themes/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ COPY config/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf COPY config/logrotate/nextcloud-syslog-ng /etc/logrotate.d/nextcloud-syslog-ng ENTRYPOINT ["/custom_entrypoint-slim.sh"] CMD ["php-fpm"] Loading