Add this line to your application's Gemfile:
gem 'unicorn_process_manager', github: 'SpringMT/unicorn_process_manager'
And then execute:
$ bundle
The gem doesn't upload rubygems.org!
- script/unicorn_manager
#!/usr/bin/env ruby
# encoding: UTF-8
require 'optparse'
require 'unicorn_process_manager'
action = ARGV.shift || '
rails_env = 'production'
rails_home = "#{ENV['HOME']}/hoge"
timeout = 60
opt = OptionParser.new(ARGV)
opt.on('-e rails_env') { |e| rails_env = e }
opt.on('-h rails_home') { |h| rails_home = h }
opt.on('-t timeout_sec') { |t| timeout = t.to_i }
opt.parse!
unicorn = UnicornProcessManager.new(rails_env, rails_home, timeout)
unicorn.send action'
script/unicorn_manager {start|stop|restart|status|reopen_log} [-e RAILS_ENV] [-h RAILS_HOME] [-t timeout_sec] [-p port]
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request