Skip to content

Instantly share code, notes, and snippets.

@jhowbhz
Created March 8, 2024 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhowbhz/1144d3181722415f6a20eda563c6682f to your computer and use it in GitHub Desktop.
Save jhowbhz/1144d3181722415f6a20eda563c6682f to your computer and use it in GitHub Desktop.
Supervisor config file
# how to install supervisor
apt install supervisor
# how to create config file supervisor
nano /etc/supervisor/conf.d/laravel-worker.conf
# set text in file, save and restart service
# service supervisor restart
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /opt/PROJECTFOLDER/artisan queue:work --tries=3 --timeout=6000
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/opt/PROJECTFOLDER/worker.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment