upd: dockerfile
install logrotate and cron to accomplish scripting to retrieve audio recording links for sermon
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM php:8.4-apache
|
FROM php:8.5-apache
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt upgrade -y && \
|
apt upgrade -y && \
|
||||||
@@ -14,8 +14,13 @@ RUN apt update && \
|
|||||||
sqlite3 \
|
sqlite3 \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
|
cron \
|
||||||
|
logrotate \
|
||||||
nano
|
nano
|
||||||
|
|
||||||
|
RUN service start cron
|
||||||
|
RUN service enable cron
|
||||||
|
|
||||||
RUN docker-php-ext-configure gd --with-jpeg
|
RUN docker-php-ext-configure gd --with-jpeg
|
||||||
RUN docker-php-ext-configure zip
|
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/tests
|
||||||
RUN rm -rf /var/www/html/translations
|
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 COMPOSER_ALLOW_SUPERUSER=1 composer install --no-scripts --no-dev --optimize-autoloader
|
||||||
RUN mkdir /data
|
RUN mkdir /data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user