Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

region23's avatar

Proper way to run Laravel Queue in Docker

Hi all! I was search in Google proper way to run Laravel Queue in Docker, but not found :( I thin k this is very typical task in 2019..... but I dont found nothing abvout this.

Maybe community tell me the right way to run queue when all my project in docker containers (php, nginx, mysql containers)?

Why this solution is poor? I found it in stackowerflow with 3 minus.

[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
0 likes
1 reply
aurawindsurfing's avatar
Level 50

Hey @region23

This solution does not run your Queue Worker in docker. It runs a command from outside of your docker container to run in a docker container called php

I stopped working with docker but the idea will be to run this command from within the container and actually build it with it already set up. Go back to the thread you are referencing and you will see that you answer is voted -3

https://stackoverflow.com/questions/48884802/docker-laravel-queuework

Go for one of the accepted solutions.

Hope it helps!

1 like

Please or to participate in this conversation.