Skip to content

Instantly share code, notes, and snippets.

@masone
Created February 14, 2012 10:04
Show Gist options
  • Save masone/1825459 to your computer and use it in GitHub Desktop.
Save masone/1825459 to your computer and use it in GitHub Desktop.
gem 'foreman', :git => 'https://github.com/tjdett/foreman.git', :branch => 'upstart_stop_fix'
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
sudo bundle exec foreman export upstart /etc/init -a xx -u yy -l /var/www/xx/current/log -c web=1
sudo start xx
1003 7603 0.0 0.0 37816 1320 ? Ss 10:53 0:00 su - yy -c cd /var/www/xx/releases/20120214093641; trap 'kill $(jobs -p)' EXIT; export PORT=5000; bundle exec unicorn -p $PORT -c ./config/unicorn.rb >> /var/www/xx/shared/log/web-1.log 2>&1
1003 7610 0.0 0.0 24288 1648 ? S 10:53 0:00 -su -c cd /var/www/xx/releases/20120214093641; trap 'kill $(jobs -p)' EXIT; export PORT=5000; bundle exec unicorn -p $PORT -c ./config/unicorn.rb >> /var/www/xx/shared/log/web-1.log 2>&1
1003 7618 16.5 0.7 219904 114804 ? Sl 10:53 0:23 unicorn master -p 5000 -c ./config/unicorn.rb
1003 7811 0.5 0.6 224376 112088 ? Sl 10:54 0:00 unicorn worker[0] -p 5000 -c ./config/unicorn.rb
sudo stop xx
1003 7618 16.5 0.7 219904 114804 ? Sl 10:53 0:23 unicorn master -p 5000 -c ./config/unicorn.rb
1003 7811 0.5 0.6 224376 112088 ? Sl 10:54 0:00 unicorn worker[0] -p 5000 -c ./config/unicorn.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment