Created
June 18, 2012 15:05
-
-
Save semperos/2948807 to your computer and use it in GitHub Desktop.
Simple Ubuntu Upstart config
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
# goes inside /etc/init/foo.conf | |
# Upstart: /etc/init/service_name.conf | |
description "start passenger stand-alone" | |
author "Me <[email protected]>" | |
# Stanzas | |
# | |
# Stanzas control when and how a process is started and stopped | |
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn | |
# When to start the service | |
start on started mysql | |
# When to stop the service | |
stop on runlevel [016] | |
# Automatically restart process if crashed | |
respawn | |
# Essentially lets upstart know the process will detach itself to the background | |
expect fork | |
# Run before process | |
pre-start script | |
end script | |
# Start the process | |
script | |
cd /var/path/to/app/staging/current | |
sh HOME=/home/deploy /usr/local/rvm/gems/ruby-1.9.2-p136@appname/gems/passenger-3.0.7/bin/passenger start --user 'deploy' -p '5000' -a '127.0.0.1' -e 'production' | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment