From 323e668ac94789d005288a354e78a97eaf618f39 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Mon, 16 Feb 2026 14:12:09 -0500 Subject: [PATCH] upd: dockerfile install logrotate and cron to accomplish scripting to retrieve audio recording links for sermon --- Dockerfile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6d615a1..d717751 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.4-apache +FROM php:8.5-apache RUN apt update && \ apt upgrade -y && \ @@ -14,8 +14,13 @@ RUN apt update && \ sqlite3 \ curl \ git \ + cron \ + logrotate \ nano +RUN service start cron +RUN service enable cron + RUN docker-php-ext-configure gd --with-jpeg RUN docker-php-ext-configure zip @@ -46,6 +51,19 @@ RUN rm -rf /var/www/html/vendor RUN rm -rf /var/www/html/tests RUN rm -rf /var/www/html/translations +RUN echo "20 1 * * 6 root cd /var/www/html && /usr/local/bin/php bin/console app:get-audio > /var/log/sermon-notes.log 2>&1" > /etc/cron.d/get-audio +RUN chmod 644 /etc/cron.d/get-audio + +RUN echo "/var/log/sermon-notes.log { + monthly + rotate 12 + compress + delaycompress + missingok + notifempty + create 644 root root +}" > /etc/logrotate.d/sermon-notes + RUN COMPOSER_ALLOW_SUPERUSER=1 composer install --no-scripts --no-dev --optimize-autoloader RUN mkdir /data