Skip to content

Instantly share code, notes, and snippets.

@sabrio
Created May 18, 2017 14:16
Show Gist options
  • Save sabrio/5648205cb754fc9682c42fe014fcdf73 to your computer and use it in GitHub Desktop.
Save sabrio/5648205cb754fc9682c42fe014fcdf73 to your computer and use it in GitHub Desktop.
CENTOS - Install Supervisor, config and run

Supervisor

yum install supervisor

Config:

Create file on: /etc/supervisor.d/sportisio-worker.conf

[program:sportisio-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/devapi.sportisio.com/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=root
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/devapi.sportisio.com/worker.log

and add include in /etc/supervisor.conf

[include]
files = supervisord.d/*.conf

Enable for auto run and start the service

$ systemctl enable supervisord
$ service supervisord start
@vahidalvandi
Copy link

change to nano /etc/supervisord.conf

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