Skip to content

Instantly share code, notes, and snippets.

@preetampvp
Last active December 16, 2016 22:13
Show Gist options
  • Save preetampvp/71dad8a70b06baf069a360da5b9df8ee to your computer and use it in GitHub Desktop.
Save preetampvp/71dad8a70b06baf069a360da5b9df8ee to your computer and use it in GitHub Desktop.
Upstart script to start puma - add this to /etc/init
pre-start script
pkill -f puma
end script
post-stop script
pkill -f puma
end script
respawn
respawn limit 15 5
start on runlevel [2345]
#start on network started and runlevel [2345] # AWS
stop on runlevel [06]
# also can be written as stop on runlevel [!2345]
script
su - uid -c "cd <location of web> && bundle exec puma" >> /var/log/puma.log
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment