Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Last active December 25, 2015 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkuchiki/7001375 to your computer and use it in GitHub Desktop.
Save tkuchiki/7001375 to your computer and use it in GitHub Desktop.
supervisord インストール
# epel
# バージョンが古いので easy_install のほうが良い
yum install supervisor
# easy_install
yum install python-setuptools
# source build
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
# supervisord.conf
echo_supervisord_conf > /etc/supervisord.conf
vim /etc/supervisord.conf
# redhat init script
wget --no-check-certificate https://raw.github.com/Supervisor/initscripts/master/fedora-bmbouter -O /etc/init.d/supervisord
chmod u+x /etc/init.d/supervisord
service supervisord start
# run level
chkconfig --add supervisord
#!/bin/sh
export RBENV_ROOT=/usr/local/rbenv
export PATH=$RBENV_ROOT/bin:$PATH
cd /home/unicorn
eval "$(/usr/local/rbenv/bin/rbenv init -)"
foreman start
# exec bundle exec unicorn_rails ...
.
.
.
[program:foreman]
command=/home/unicorn/foreman_start.sh
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/tmp/unicorn-stdout.log
stderr_logfile=/tmp/unicorn-stderr.log
user=vagrant
directory=/home/unicorn
environment=PORT=9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment