P
P
Pavel2019-11-01 12:10:08
Laravel
Pavel, 2019-11-01 12:10:08

What is the correct way to run Laravel Queue in Docker?

Googled on the subject. Didn't find anything on the topic. It is strange that in 2019 with widespread containerization, this topic is not really raised.
I found such a method on Stackowerflow, but it has 3 minuses and it’s not clear why it’s bad?

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=docker exec php php /path/to/artisan queue:work redis --sleep=3 --tries=5
autostart=true
autorestart=true
user=root
numprocs=8
redirect_stderr=true
stdout_logfile=/var/logs/worker.log

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2019-11-01
@Sanasol

Googled on the subject. Didn't find anything on the subject.

yes, yes, yes, googling.
https://laravel.com/docs/6.x/queues#supervisor-con...
Apart from the second option, where the config is also ready https://laravel.com/docs/6.x/horizon

R
Ramm, 2019-11-01
@rammtw

See laradock's php-worker example
https://github.com/laradock/laradock/tree/master/p...
Specifically, the line
https://github.com/laradock/laradock/blob/master/p...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question