Skip to content

Instantly share code, notes, and snippets.

@lucassmacedo
Last active June 1, 2020 15:12
Show Gist options
  • Save lucassmacedo/a27450842f38d2fcd3eb41c674f8f97e to your computer and use it in GitHub Desktop.
Save lucassmacedo/a27450842f38d2fcd3eb41c674f8f97e to your computer and use it in GitHub Desktop.
Laravel Supervisor Process
[program:echo-worker]
process_name=%(program_name)s_%(process_num)02d
directory=/home/$USER/www/portal
command=/usr/bin/laravel-echo-server start
autostart=true
autorestart=true
user=$USER
numprocs=1
redirect_stderr=true
stdout_logfile=/home/$USER/www/echo-worker.log
[program:horizon-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/$USER/www/portal/artisan horizon
autostart=true
autorestart=true
user=$USER
redirect_stderr=true
stdout_logfile=/home/$USER/www/horizon.log
[program:queue-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/$USER/www/portal/artisan queue:work --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
user=$USER
numprocs=1
redirect_stderr=true
stdout_logfile=/home/$USER/www/queue-worker.log
@lucassmacedo
Copy link
Author

After add a file on folder /etc/supervisor/conf.d
supervisorctl reread
supervisorctl update

ps aux | grep $NAME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment