From 3a73a9be5c301f6d4cfafa3b7708921e6597d5d0 Mon Sep 17 00:00:00 2001 From: Nikolay Gorylenko Date: Sun, 2 Aug 2015 12:04:10 +0200 Subject: [PATCH] add cron config --- Dockerfile | 6 +++++- docker/crontab | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docker/crontab diff --git a/Dockerfile b/Dockerfile index 2cd61fc2..66f1e9e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,4 +30,8 @@ RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.co EXPOSE 8000 -CMD ["/sbin/entrypoint.sh"] \ No newline at end of file +ADD crontab /etc/cron.d/artisan-schedule +RUN chmod 0644 /etc/cron.d/artisan-schedule +RUN touch /var/log/cron.log + +CMD ["/sbin/entrypoint.sh"] diff --git a/docker/crontab b/docker/crontab new file mode 100644 index 00000000..d41f4aa3 --- /dev/null +++ b/docker/crontab @@ -0,0 +1 @@ +* * * * * php /var/www/html/artisan schedule:run 1>> /dev/null 2>&1