Last active
December 16, 2016 22:13
-
-
Save preetampvp/71dad8a70b06baf069a360da5b9df8ee to your computer and use it in GitHub Desktop.
Upstart script to start puma - add this to /etc/init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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