Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Contains methods for managing unicorn servers through git
Ruby
tag: v0.0.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
lib
.gitignore
.rvmrc
.travis.yml
CHANGELOG.md
Gemfile
README.md
Rakefile
capistrano-unicorn-methods.gemspec

README.md

Capistrano Unicorn Methods Build Status

Contains a namespace with methods for administrating the unicorn server through capistrano recipes.

Usage

The gem gives you access to the followig methods within the unicorn.<method> namespace.

  • unicorn.start will start the unicorn server in demonized form on port 3000 (default) with the config file placed in app/config/unicorn.rb.
  • unicorn.stop will stop the unicorn server.
  • unicorn.restart restarts the unicorn server by moving the old one to .pid.oldbin and running a unicorn.cleanup command.
  • unicorn.cleanup will remove the master and worker processes associated with the .pid.oldbin file.

If you'r having trouble targeting the correct namespace you can alternatively run the commands prepended with a top. so it becomes e.g. top.unicorn.start.

Requirements

  • unicorn

It also relies on the current_release variable beeing present. This is part of capistrano's standard deploy schema, so there should be no problems.

Customization

You can customize the gems behavior by setting any (or all) of the following options within capistrano's configuration:

  • unicorn_pid indicates the path for the pid file. Defaults to shared/pids/unicorn.pid.
  • unicorn_old_pid contains the pid for the old server. Defaults to shared/pids/unicorn.pid.oldbin.
  • unicorn_config the path to the unicorn config file. Defaults to /path/to/your/app/config/unicorn.rb.
  • unicorn_port defines the port that unicorn should listen on. Defaults to 3000.
  • use_bundler defines if unicorn should be started through bundler. Defaults to true
Something went wrong with that request. Please try again.