Matomo Analytics

Ploi makes it a breeze to run Laravel Horizon. You can use the 'Daemons' tab in server level to configure this.

Use this command to run Laravel Horizon:

php /home/ploi/my-app.com/artisan horizon

1 process is enough as Laravel Horizon is able to spawn multiple supervisor workers. (More at the Laravel Documentation)

Take the following screenshot as an example:

 This will spawn a supervisor configuration file like this:

[program:worker-628]
command=php /home/ploi/my-app.com/artisan horizon
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
user=ploi
redirect_stderr=true
numprocs=1
stdout_logfile=/home/ploi/.ploi/worker-628.log

Once code changes, you will have to reload the horizon process. To do this you will have to add this into your deploy script at the end:

php artisan horizon:terminate

21 May 2019 (last updated 2 years ago)

7813 views

Written by Dennis

Dennis brings over 6 years of hands-on experience in server management, specializing in optimizing web services for scalability and security.

Back to Laravel


Start free trial