Use cron.sh in the example dockerfiles
This commit is contained in:
parent
2e3645f853
commit
022575326b
@ -59,9 +59,8 @@ The required steps for each optional/recommended package that is not already in
|
|||||||
`apt install LibreOffice` </br>
|
`apt install LibreOffice` </br>
|
||||||
|
|
||||||
#### CRON via supervisor
|
#### CRON via supervisor
|
||||||
`apt install supervisor cron` </br>
|
`apt install supervisor` </br>
|
||||||
`mkdir /var/log/supervisord /var/run/supervisord` </br>
|
`mkdir /var/log/supervisord /var/run/supervisord` </br>
|
||||||
`echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -` </br>
|
|
||||||
The following Dockerfile commands are also necessary for a sucessfull cron installation: </br>
|
The following Dockerfile commands are also necessary for a sucessfull cron installation: </br>
|
||||||
`COPY supervisord.conf /etc/supervisor/supervisord.conf` </br>
|
`COPY supervisord.conf /etc/supervisor/supervisord.conf` </br>
|
||||||
`CMD ["/usr/bin/supervisord"]` </br>
|
`CMD ["/usr/bin/supervisord"]` </br>
|
||||||
|
@ -2,11 +2,8 @@ FROM nextcloud:apache
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
supervisor \
|
supervisor \
|
||||||
cron \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& mkdir /var/log/supervisord /var/run/supervisord
|
||||||
|
|
||||||
RUN mkdir /var/log/supervisord /var/run/supervisord && \
|
|
||||||
echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -
|
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
|
|||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=cron -f
|
command=/cron.sh
|
||||||
|
@ -2,11 +2,8 @@ FROM nextcloud:fpm
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
supervisor \
|
supervisor \
|
||||||
cron \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& mkdir /var/log/supervisord /var/run/supervisord
|
||||||
|
|
||||||
RUN mkdir /var/log/supervisord /var/run/supervisord && \
|
|
||||||
echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -
|
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
|
|||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=cron -f
|
command=/cron.sh
|
||||||
|
@ -3,7 +3,6 @@ FROM nextcloud:apache
|
|||||||
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \
|
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \
|
||||||
&& apt-get update && apt-get install -y \
|
&& apt-get update && apt-get install -y \
|
||||||
supervisor \
|
supervisor \
|
||||||
cron \
|
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libmagickwand-dev \
|
libmagickwand-dev \
|
||||||
libgmp3-dev \
|
libgmp3-dev \
|
||||||
@ -18,8 +17,7 @@ RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/so
|
|||||||
&& docker-php-ext-install bz2 gmp imap \
|
&& docker-php-ext-install bz2 gmp imap \
|
||||||
&& pecl install imagick smbclient \
|
&& pecl install imagick smbclient \
|
||||||
&& docker-php-ext-enable imagick smbclient \
|
&& docker-php-ext-enable imagick smbclient \
|
||||||
&& mkdir /var/log/supervisord /var/run/supervisord \
|
&& mkdir /var/log/supervisord /var/run/supervisord
|
||||||
&& echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -
|
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
|
|||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=cron -f
|
command=/cron.sh
|
||||||
|
@ -3,7 +3,6 @@ FROM nextcloud:fpm
|
|||||||
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \
|
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \
|
||||||
&& apt-get update && apt-get install -y \
|
&& apt-get update && apt-get install -y \
|
||||||
supervisor \
|
supervisor \
|
||||||
cron \
|
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libmagickwand-dev \
|
libmagickwand-dev \
|
||||||
libgmp3-dev \
|
libgmp3-dev \
|
||||||
@ -18,8 +17,7 @@ RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/so
|
|||||||
&& docker-php-ext-install bz2 gmp imap \
|
&& docker-php-ext-install bz2 gmp imap \
|
||||||
&& pecl install imagick smbclient \
|
&& pecl install imagick smbclient \
|
||||||
&& docker-php-ext-enable imagick smbclient \
|
&& docker-php-ext-enable imagick smbclient \
|
||||||
&& mkdir /var/log/supervisord /var/run/supervisord \
|
&& mkdir /var/log/supervisord /var/run/supervisord
|
||||||
&& echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -
|
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
|
|||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=cron -f
|
command=/cron.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user