rash07/scheduling
Cron service for Laravel App, composer & php installed
10K+
FROM rash07/php-fpm:8.2
RUN apt-get update && apt-get install -y cron
# Add docker custom crontab
ADD laravel-scheduling /etc/cron.d/laravel-scheduling
# Update the crontab file permission
RUN chmod 0644 /etc/cron.d/laravel-scheduling
# Specify crontab file for running
RUN crontab /etc/cron.d/laravel-scheduling
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
# execute crontab
CMD ["cron", "-f"]
* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1
* * * * * php /var/www/html/artisan tenancy:run schedule:run >> /dev/null 2>&1
version: '3'
services:
php:
build: .
image: rash07/scheduling:8.2
working_dir: /var/www/html
volumes:
- ./:/var/www/html
docker pull rash07/scheduling