Fix cron (again)

This commit is contained in:
Glenn Y. Rolland 2021-03-27 17:01:42 +01:00
parent 966300ef65
commit b4fc39a54e

View file

@ -29,19 +29,31 @@ RUN apt-get update \
# && echo "apc.enable=1" >> /usr/local/etc/php/glenux-apcu.ini \
# && docker-php-ext-enable apcu
## DO NOT install cron since it is included by default now
## ref: https://github.com/nextcloud/docker/blob/master/21.0/apache/Dockerfile
# RUN apt-get install -q -y cron \
# && apt-get clean \
# && echo "*/5 * * * * root su -l www-data -s /bin/bash -c 'php -d memory_limit=1024M -f /var/www/html/cron.php' > /dev/null 2>&1" >> /etc/crontab
# Raise memory limit for PHP
RUN echo "memory_limit=1024M" > /usr/local/etc/php/conf.d/memory-limit.ini
# CMD cron && apache2-foreground
# Mandatory for bookmark extension
# but missing from deb packages
# RUN apt-get update \
# && apt-get install -y php7.3-gmp
##
## Raise memory limit for PHP
##
ENV PHP_MEMORY_LIMIT=1024M
RUN echo "memory_limit=1024M" > /usr/local/etc/php/conf.d/memory-limit.ini
##
## CRON SETUP
##
## Based on https://github.com/nextcloud/docker/tree/master/.examples/dockerfiles/cron/apache
RUN apt-get update && apt-get install -y \
supervisor \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /var/log/supervisord /var/run/supervisord
COPY supervisord.conf /etc/supervisord.conf
ENV NEXTCLOUD_UPDATE=1
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]