1
0

Added a mean to run scheduled tasks

This commit is contained in:
Richard Dern 2024-04-22 00:27:22 +02:00
parent bd3dc75bff
commit c246e0dd8c
2 changed files with 9 additions and 0 deletions

View File

@ -1,2 +1,10 @@
ARG PHP_VERSION=8.0
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
View File

@ -0,0 +1 @@
* * * * * cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1