Added a mean to run scheduled tasks
This commit is contained in:
parent
bd3dc75bff
commit
c246e0dd8c
|
@ -1,2 +1,10 @@
|
||||||
ARG PHP_VERSION=8.0
|
ARG PHP_VERSION=8.0
|
||||||
FROM sail-${PHP_VERSION}/app as base
|
FROM sail-${PHP_VERSION}/app as base
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install cron imagemagick php8.3-imagick
|
||||||
|
|
||||||
|
COPY crontab /etc/cron.d/laravel-scheduler
|
||||||
|
RUN chmod 0644 /etc/cron.d/laravel-scheduler
|
||||||
|
RUN crontab /etc/cron.d/laravel-scheduler
|
||||||
|
RUN touch /var/log/cron.log
|
||||||
|
|
1
docker/crontab
Normal file
1
docker/crontab
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* * * * * cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1
|
Loading…
Reference in New Issue
Block a user