Skip to content

SpringMT/unicorn_process_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnicornProcessManager

Installation

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!

Usage

sample script

  • 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'

command

script/unicorn_manager {start|stop|restart|status|reopen_log} [-e RAILS_ENV] [-h RAILS_HOME] [-t timeout_sec] [-p port]

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages