Step 1: Install Supervisor in Ubuntu
To install supervisor in ubuntu you can use "apt-get" command line. Do note that you need to use "sudo" in order to run this command.
sudo apt-get install supervisor
Step 2: Supervisor Configuration
The supervisor configuration can be located in "/etc/supervisor/conf.d" and from within this directory, you can create as many configurations as you like.
[program:horizon] process_name=%(program_name)s command=php /home/forge/example.com/artisan horizon autostart=true autorestart=true user=forge redirect_stderr=true stdout_logfile=/home/forge/example.com/horizon.log stopwaitsecs=3600
Step 3: Start Supervisor
Once you have created the configuration, you can start the supervisor process. To start supervisor you can run the following commands.
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start horizon