1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/tools/jungle/upstart/puma.conf

53 lines
1.3 KiB
Text
Raw Normal View History

# /etc/init/puma.conf - Puma config
# This example config should work with Ubuntu 12.04+. It
# allows you to manage multiple Puma instances with
# Upstart, Ubuntu's native service management tool.
#
# See workers.conf for how to manage all Puma instances at once.
#
2013-06-05 13:28:32 -04:00
# Save this config as /etc/init/puma.conf then manage puma with:
# sudo start puma index=0
# sudo stop puma index=0
# sudo status puma index=0
#
# or use the service command:
# sudo service puma {start,stop,restart,status}
#
description "Puma Background Worker"
# no "start on", we don't want to automatically start
stop on (stopping puma-manager or runlevel [06])
# change apps to match your deployment user if you want to use this as a less privileged user (recommended!)
# setuid apps
# setgid apps
respawn
respawn limit 3 30
instance ${app}
script
# this script runs in /bin/sh by default
# respawn as bash so we can source in rbenv/rvm
exec /bin/bash <<EOT
export HOME=/home/apps
2013-06-05 13:28:32 -04:00
# Pick your poison :) Or none if you're using a system wide installed Ruby.
# rbenv
# source /home/apps/.bash_profile
# OR
# source /home/apps/.profile
#
# rvm
# source /home/apps/.rvm/scripts/rvm
logger -t puma "Starting server: $app"
cd $app
exec bundle exec puma -C config/puma.rb
EOT
end script