Mojolicousアプリのリリース手順
毎回忘れてしまうので、一回まとめておく。環境等は自分向けなので、個人的な備忘録です。
nginx.confの編集
/usr/local/nginx/conf/nginx.conf
upstream laundry { server 127.0.0.1:8016; } server { listen 80; server_name side-business.biz; #index index.html; root /home/your_username/laundry/laundry_web/public; access_log /var/log/laundry.access.log main; location @proxy { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://laundry; } location / { try_files $uri @proxy; } }
supervisorctl restart nginx || * Mojolicousアプリのリリース /etc/supervisord.dへlaundry.confを作成 |text| [program:laundry] user=hoge command=/home/hoge/laundry/laundry_web/run directory=/home/hoge/laundry/laundry_web redirect_stderr=true stdout_logfile=/var/log/supervisord/laundry.log stdout_logfile_maxbytes = 5MB stderr_logfile=/var/log/supervisord/laundry.err stderr_logfile_maxbytes = 5MB stdout_logfile_backups = 5 autorestart = true startsecs = 5