From 60e6d99b95b28a870d28f1464d27025b93ceb635 Mon Sep 17 00:00:00 2001 From: Nikolay Gorylenko Date: Sun, 2 Aug 2015 12:49:15 +0200 Subject: [PATCH 1/3] do not daemonize cron --- docker/supervisord.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 46b1761b9..c3e6f4538 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -25,4 +25,4 @@ command=/usr/sbin/php5-fpm -c /etc/php5/fpm command=/usr/sbin/nginx [program:cron] -command=/usr/sbin/cron +command=/usr/sbin/cron -f From 427c8d24a5c9166c844562c272aac44ed86a7838 Mon Sep 17 00:00:00 2001 From: Nikolay Gorylenko Date: Sun, 2 Aug 2015 12:57:12 +0200 Subject: [PATCH 2/3] add user to crontab --- docker/crontab | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/crontab b/docker/crontab index d41f4aa3f..1b0fa1503 100644 --- a/docker/crontab +++ b/docker/crontab @@ -1 +1,2 @@ -* * * * * php /var/www/html/artisan schedule:run 1>> /dev/null 2>&1 +#minute hour mday month wday who command +* * * * * www-data php /var/www/html/artisan schedule:run 1>> /dev/null 2>&1 From ee7a0ec5f287075bd73efa78ef95468ec48be5fd Mon Sep 17 00:00:00 2001 From: Nikolay Gorylenko Date: Sun, 2 Aug 2015 12:58:28 +0200 Subject: [PATCH 3/3] proper command to add file --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 66f1e9e39..eea72d883 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.co EXPOSE 8000 -ADD crontab /etc/cron.d/artisan-schedule +COPY crontab /etc/cron.d/artisan-schedule RUN chmod 0644 /etc/cron.d/artisan-schedule RUN touch /var/log/cron.log