Skip to content

Instantly share code, notes, and snippets.

@srbartlett
Created October 14, 2013 02:47
Show Gist options
  • Save srbartlett/6969925 to your computer and use it in GitHub Desktop.
Save srbartlett/6969925 to your computer and use it in GitHub Desktop.
foreman upstart template
start on starting <%= app %>-<%= name %>
stop on stopping <%= app %>-<%= name %>
respawn
exec su - <%= user %> --shell=/bin/bash -c 'cd <%= engine.root %>; trap '\''kill -WINCH $(jobs -p) && kill -QUIT $(jobs -p)'\'' EXIT; export PORT=<%= port %>;<% engine.env.each_pair do |var,env| %> export <%= var.upcase %>=<%= env %>; <% end %> <%= process.command %> >> <%= log %>/<%=name%>-<%=num%>.log 2>&1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment