huedaya.com/blog
just bunch of .md files
Laravel Queue in Dokku

If you want to run Laravel Queues inside Dokku, then you need to create Procfile in your root project directory with this following content:

plaintext
web: php artisan serve --host=0.0.0.0 --port=8080
worker: php artisan queue:work database

Make sure add QUEUE_CONNECTION=database environment in your Dokku config:

bash
dokku config:set app-name QUEUE_CONNECTION=database

Then spin up the worker

bash
dokku ps:scale app-name web=1 worker=1

That's it!

Last update: 2024-03-17 15:46:57 UTC (4 months ago)