1
1

More than 3 years have passed since last update.

Supervisor設定

Last updated at Posted at 2020-10-21
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

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1