Skip to content

Instantly share code, notes, and snippets.

@j1n6
Created January 12, 2015 17:06
Show Gist options
  • Select an option

  • Save j1n6/e08ce79c151bb4b0ae0e to your computer and use it in GitHub Desktop.

Select an option

Save j1n6/e08ce79c151bb4b0ae0e to your computer and use it in GitHub Desktop.
description "Faye websockets"
start on runlevel [2345]
stop on runlevel [!2345]
#Respawn the process if it crashes
#If it respawns more than 10 times in 5 seconds stop
#respawn
respawn limit 10 5
setuid <%= @deployer %>
setgid <%= @deployer %>
script
exec /bin/bash <<EOT
# use syslog for logging
exec &> /dev/kmsg
# pull in rbenv environments
export HOME=/home/<%= @deployer %>
source /home/<%= @deployer %>/.rbenvrc
cd /home/<%= @deployer %>/riddler-web/current
exec bundle exec rackup config_faye.ru -s thin -E <%= @environment %> --pid pids/faye.pid
EOT
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment