Skip to content

Instantly share code, notes, and snippets.

@switchflip
Created August 11, 2015 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save switchflip/efedd21ba6a9e63e6bce to your computer and use it in GitHub Desktop.
Save switchflip/efedd21ba6a9e63e6bce to your computer and use it in GitHub Desktop.
Upstart phoenix ubuntu 14.04
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