Created
May 24, 2015 11:49
-
-
Save colindensem/019f930b71a13dafb978 to your computer and use it in GitHub Desktop.
Ubutnu - Upstart - Phoenix - Elixir
This file contains 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
#!upstart | |
#Elixir app is deployed using capistrano v3 | |
#Swap app_name for your application name | |
description "Service Up - app_name" | |
author "Colin Densem <[email protected]>" | |
start on filesystem | |
stop on runlevel[!2345] | |
chdir /home/deploy/apps/app_name/current | |
setuid deploy | |
setgid deploy | |
oom never | |
respawn | |
respawn limit 10 60 | |
console log | |
#needed for Erlang. | |
env HOME="/home/deploy" | |
export HOME | |
env MIX_ENV=prod | |
env PORT=8088 | |
export MIX_ENV | |
export PORT | |
exec ./rel/app_name/bin/app_name start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment