Skip to content

Instantly share code, notes, and snippets.

@colindensem
Created May 24, 2015 11:49
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colindensem/019f930b71a13dafb978 to your computer and use it in GitHub Desktop.
Save colindensem/019f930b71a13dafb978 to your computer and use it in GitHub Desktop.
Ubutnu - Upstart - Phoenix - Elixir
#!upstart
#Elixir app is deployed using capistrano v3
#Swap app_name for your application name
description "Service Up - app_name"
author "Colin Densem <hello@summit360.co.uk>"
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