sudo yum install python-setuptools
sudo easy_install pip
sudo pip install supervisor
sudo echo_supervisord_conf > /etc/supervisord.conf
sudo mkdir /etc/supervisord.d
[include]
files = /etc/supervisord.d/*.conf
systemctlへのサービス登録
touch /etc/systemd/system/supervisord.service
下記に編集
[Unit]
Description=Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
ExecStart=/usr/bin/supervisord -n -c /etc/supervisord.conf
ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown
ExecReload=/usr/bin/supervisorctl $OPTIONS reload
KillMode=process
Restart=on-failure
RestartSec=50s
[Install]
WantedBy=multi-user.target
Queue設定
[program:laravel]
process_name=%(program_name)s_%(process_num)02d
command=php /home/vagrant/project/work-app/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=vagrant
numprocs=1
redirect_stderr=true
stdout_logfile=/home/vagrant/project/work-app/storage/logs/worker.log
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme