Skip to content

Instantly share code, notes, and snippets.

@SeyamMs
Last active January 18, 2025 14:25
Show Gist options
  • Save SeyamMs/2da8fcfa678633dcf6bb2a801d1f3633 to your computer and use it in GitHub Desktop.
Save SeyamMs/2da8fcfa678633dcf6bb2a801d1f3633 to your computer and use it in GitHub Desktop.
Install supervisor on VPS with Ubuntu 24.04 and configure laravel worker
sudo apt update && sudo apt install supervisor
sudo systemctl status supervisor
nano /etc/supervisor/conf.d/queue.conf
[program:laravel-queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/example.com/artisan queue:work
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/example.com/storage/logs/queue.log
stopwaitsecs=3600
stdout_logfile_maxbytes=5MB
sudo supervisorctl reread
sudo supervisorctl update
sudo systemctl status supervisor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment