Created
August 11, 2015 21:02
-
-
Save switchflip/efedd21ba6a9e63e6bce to your computer and use it in GitHub Desktop.
Upstart phoenix ubuntu 14.04
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
description "test_app upstart" | |
## Uncomment the following two lines to run the | |
## application as www-data:www-data | |
setuid phoenix | |
setgid phoenix | |
start on runlevel [2345] | |
stop on runlevel [016] | |
expect stop | |
respawn | |
env MIX_ENV=prod | |
export MIX_ENV | |
## Uncomment the following two lines if we configured | |
## our port with an environment variable. | |
#env PORT=8888 | |
#export PORT | |
## Add app HOME directory. | |
env HOME="/home/phoenix" | |
export HOME | |
pre-start exec /bin/sh /srv/www/test_app/current/rel/test_app/bin/test_app start | |
post-stop exec /bin/sh /srv/www/test_app/current/rel/test_app/bin/test_app stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment