Skip to content

Instantly share code, notes, and snippets.

@rakeshsoni18
Created February 10, 2022 07:25
Show Gist options
  • Save rakeshsoni18/90ccfe34e7b764d937c65b4448898aeb to your computer and use it in GitHub Desktop.
Save rakeshsoni18/90ccfe34e7b764d937c65b4448898aeb to your computer and use it in GitHub Desktop.
Configuration of Supervisor in ubuntu
Tutorial link
https://youtu.be/r9HKfJFDEFE
Step 1:-
sudo apt-get install supervisor
Step 2:-
Now go to following path
cd /etc/supervisor/conf.d
Step 3:-
Create a new configration file
sudo vim queue-worker.conf
Step 4:-
Now in newly created queue-worker.conf paste following code
[program:queue-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/project/artisan queue:work
autostart=true
autorestart=true
user=root
numprocs=3
redirect_stderr=true
stdout_logfile=/path/to/project/storage/logs/queue-worker.log
Step 5:-
Run the following command on base path of project
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl reload
sudo service supervisor restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment