Supervisor for Laravel queue worker PHP 7.1, Redis, MySQL
193
See also: https://github.com/bobbymaher/docker-laravel-workers for full code for cron, queue worker, horizon Laravel Cron https://hub.docker.com/r/bobbymhr/laravel-cron/ Laravel Horizon https://hub.docker.com/r/bobbymhr/laravel-horizon/
FROM phpdockerio/php71-fpm:latest
RUN apt-get update
&& apt-get -y --no-install-recommends install php7.1-mysql php-redis supervisor
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
&& export TERM=xterm
COPY supervisord.conf /etc/supervisord.conf
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
!!! CHANGE THE PATH BELOW (/var/www/your-project/) !!!
[supervisord] nodaemon=true [program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/your-project/artisan queue:work --sleep=5 --tries=3 --daemon autostart=true autorestart=true numprocs=10 redirect_stderr=true
Content type
Image
Digest
Size
81.5 MB
Last updated
about 9 years ago
docker pull bobbymhr/laravel-queue