summaryrefslogtreecommitdiffstats
path: root/.examples
diff options
context:
space:
mode:
authorTilo Spannagel <development@tilosp.de>2018-01-30 13:40:15 +0100
committerTilo Spannagel <development@tilosp.de>2018-01-30 13:40:15 +0100
commit022575326bbc37ff09f44d941baf883f60291d14 (patch)
treebf7777a277e948c84d6fdbeb4389e0b28b58f94f /.examples
parent2e3645f8536a969da8f4e18f9fd312ab9b2fd439 (diff)
Use cron.sh in the example dockerfiles
Diffstat (limited to '.examples')
-rw-r--r--.examples/README.md3
-rw-r--r--.examples/dockerfiles/cron/apache/Dockerfile9
-rw-r--r--.examples/dockerfiles/cron/apache/supervisord.conf2
-rw-r--r--.examples/dockerfiles/cron/fpm/Dockerfile9
-rw-r--r--.examples/dockerfiles/cron/fpm/supervisord.conf2
-rw-r--r--.examples/dockerfiles/full/apache/Dockerfile4
-rw-r--r--.examples/dockerfiles/full/apache/supervisord.conf2
-rw-r--r--.examples/dockerfiles/full/fpm/Dockerfile4
-rw-r--r--.examples/dockerfiles/full/fpm/supervisord.conf2
9 files changed, 13 insertions, 24 deletions
diff --git a/.examples/README.md b/.examples/README.md
index 0b381ee5..c9843b4b 100644
--- a/.examples/README.md
+++ b/.examples/README.md
@@ -59,9 +59,8 @@ The required steps for each optional/recommended package that is not already in
`apt install LibreOffice` </br>
#### CRON via supervisor
-`apt install supervisor cron` </br>
+`apt install supervisor` </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>
`COPY supervisord.conf /etc/supervisor/supervisord.conf` </br>
`CMD ["/usr/bin/supervisord"]` </br>
diff --git a/.examples/dockerfiles/cron/apache/Dockerfile b/.examples/dockerfiles/cron/apache/Dockerfile
index dd4939a8..2a6f3e73 100644
--- a/.examples/dockerfiles/cron/apache/Dockerfile
+++ b/.examples/dockerfiles/cron/apache/Dockerfile
@@ -1,12 +1,9 @@
FROM nextcloud:apache
RUN apt-get update && apt-get install -y \
- supervisor \
- cron \
- && rm -rf /var/lib/apt/lists/*
-
-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 -
+ supervisor \
+ && rm -rf /var/lib/apt/lists/* \
+ && mkdir /var/log/supervisord /var/run/supervisord
COPY supervisord.conf /etc/supervisor/supervisord.conf
diff --git a/.examples/dockerfiles/cron/apache/supervisord.conf b/.examples/dockerfiles/cron/apache/supervisord.conf
index 25ae32f8..836a08ad 100644
--- a/.examples/dockerfiles/cron/apache/supervisord.conf
+++ b/.examples/dockerfiles/cron/apache/supervisord.conf
@@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
-command=cron -f
+command=/cron.sh
diff --git a/.examples/dockerfiles/cron/fpm/Dockerfile b/.examples/dockerfiles/cron/fpm/Dockerfile
index b93eed1b..1e4b4025 100644
--- a/.examples/dockerfiles/cron/fpm/Dockerfile
+++ b/.examples/dockerfiles/cron/fpm/Dockerfile
@@ -1,12 +1,9 @@
FROM nextcloud:fpm
RUN apt-get update && apt-get install -y \
- supervisor \
- cron \
- && rm -rf /var/lib/apt/lists/*
-
-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 -
+ supervisor \
+ && rm -rf /var/lib/apt/lists/* \
+ && mkdir /var/log/supervisord /var/run/supervisord
COPY supervisord.conf /etc/supervisor/supervisord.conf
diff --git a/.examples/dockerfiles/cron/fpm/supervisord.conf b/.examples/dockerfiles/cron/fpm/supervisord.conf
index ff27295f..4f762592 100644
--- a/.examples/dockerfiles/cron/fpm/supervisord.conf
+++ b/.examples/dockerfiles/cron/fpm/supervisord.conf
@@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
-command=cron -f
+command=/cron.sh
diff --git a/.examples/dockerfiles/full/apache/Dockerfile b/.examples/dockerfiles/full/apache/Dockerfile
index 8a7c65da..31229792 100644
--- a/.examples/dockerfiles/full/apache/Dockerfile
+++ b/.examples/dockerfiles/full/apache/Dockerfile
@@ -3,7 +3,6 @@ FROM nextcloud:apache
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \
&& apt-get update && apt-get install -y \
supervisor \
- cron \
ffmpeg \
libmagickwand-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 \
&& pecl install imagick smbclient \
&& docker-php-ext-enable imagick smbclient \
- && mkdir /var/log/supervisord /var/run/supervisord \
- && echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -
+ && mkdir /var/log/supervisord /var/run/supervisord
COPY supervisord.conf /etc/supervisor/supervisord.conf
diff --git a/.examples/dockerfiles/full/apache/supervisord.conf b/.examples/dockerfiles/full/apache/supervisord.conf
index 25ae32f8..836a08ad 100644
--- a/.examples/dockerfiles/full/apache/supervisord.conf
+++ b/.examples/dockerfiles/full/apache/supervisord.conf
@@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
-command=cron -f
+command=/cron.sh
diff --git a/.examples/dockerfiles/full/fpm/Dockerfile b/.examples/dockerfiles/full/fpm/Dockerfile
index af37cd53..4798db42 100644
--- a/.examples/dockerfiles/full/fpm/Dockerfile
+++ b/.examples/dockerfiles/full/fpm/Dockerfile
@@ -3,7 +3,6 @@ FROM nextcloud:fpm
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \
&& apt-get update && apt-get install -y \
supervisor \
- cron \
ffmpeg \
libmagickwand-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 \
&& pecl install imagick smbclient \
&& docker-php-ext-enable imagick smbclient \
- && mkdir /var/log/supervisord /var/run/supervisord \
- && echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -
+ && mkdir /var/log/supervisord /var/run/supervisord
COPY supervisord.conf /etc/supervisor/supervisord.conf
diff --git a/.examples/dockerfiles/full/fpm/supervisord.conf b/.examples/dockerfiles/full/fpm/supervisord.conf
index ff27295f..4f762592 100644
--- a/.examples/dockerfiles/full/fpm/supervisord.conf
+++ b/.examples/dockerfiles/full/fpm/supervisord.conf
@@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
-command=cron -f
+command=/cron.sh