Laradock needs to be set up to work with Supervisor. Here is how to Run Horizon by Supervisord in Laradock .
To Run Horizon by supervisord in Laradock you have to add horizon.conf to php-worker/supervisord.d/horizon.conf with the following content
[program:horizon] process_name=%(program_name)s_%(process_num)02d command=php /var/www/laravel/artisan horizon autostart=true autorestart=true numprocs=1 redirect_stderr=true
Adding Queue Worker
Had an issue that the job would just stay paused. Had to add a worker queue using:
php artisan queue:work --queue=ssl-manager -- redis
You can however also add this queue to supervisord as another config:
[program:ssl-manager] process_name=%(program_name)s_%(process_num)02d command=php /var/www/laravel/artisan queue:work --queue=ssl-manager -- redis autostart=true autorestart=true numprocs=1 redirect_stderr=true
then you can restart the docker using
docker-compose restart php-worker
Also to make supervisor check for changes check into your php worker using
docker-compose exec php-worker ash
This so it is made aware of the new config. Then you can use
to update supervisor on your changes.