Capistrano::Tools
It is a collection of scripts for capistrano
- unicorn deploy script
- script to manage config yml fails (prompt paswords on deploy:setup)
Installation
Add this line to your application's Gemfile:
gem 'capistrano-tools'
And then execute:
$ bundle
Usage
Unicorn
Require the gem in your deploy script
require 'capistrano-tools'
add deploy restart after callback for unicorn
after 'deploy:restart', 'unicorn:reload'
You can set following variables for unicorn:
- unicorn_env : unicron environment, defaults to rails_env or env.
- unicorn_pid : location of unicron pid file, defaults to shared/pids folder
- unicorn_bundle : path to bundle library, defaults to bundle_cmd or "bundle"
- unicorn_bin : path to unicron library, defaults to 'unicron'
** If your are using unicron with unix socket file, do not locate it in to current directory. **
Templater
Require the gem in your deploy script
require 'capistrano-tools'
Create template and set templater variable:
set :templater, :template_dir => "lib/capistrano/templates", :templates => ['database']
TODO
- create generator to create default files (config/unicorn/production.rb, config/deploy.rb, config/deploy/production.rb, Capfile)
Contributing
- 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