webficient / capistrano-recipes

Useful Capistrano recipes

This URL has Read+Write access

philm (author)
Thu Oct 01 14:47:18 -0700 2009
commit  cd5b8cfffb7f3e49fd8305a7bcd31e1ae8a6e2b2
tree    2167fda7386b5a4268466b6db0c81e2b2dc1a213
parent  c63b15bc4ce112d5ce76bae35afff29ff3953585
name age message
file .gitignore Wed Apr 29 15:39:35 -0700 2009 Initial commit to capistrano-recipes. [philm]
file LICENSE Thu Apr 30 03:47:21 -0700 2009 initial release [philm]
file README.rdoc Thu Oct 01 14:47:18 -0700 2009 docs updated [philm]
file Rakefile Thu Oct 01 14:38:33 -0700 2009 Removed explicit dependency on capistrano-ext; ... [philm]
file VERSION.yml Loading commit data...
file capistrano-recipes.gemspec
directory lib/ Thu Oct 01 14:47:18 -0700 2009 docs updated [philm]
README.rdoc

Capistrano Recipes

Useful Capistrano recipes including:

  • Create MySQL database and user on server (via prompts)
  • Create standalone copy of database.yml in shared path (via prompts)
  • Log rotation and tailing commands
  • Restart and profile Phusion Passenger application server

Included Tasks

Installation

Easy as pie…

Ensure you have the Capistrano gem installed:

  sudo gem install capistrano

Optionally install the Capistrano extensions gem to give you multistage support:

  sudo gem install capistrano-ext

Install this gem:

  sudo gem install capistrano-recipes --source=http://gemcutter.com

To setup the initial Capistrano deploy file, go to your Rails app folder via command line and enter:

  capify .

Inside the newly created config/deploy.rb, add:

  require 'capistrano_recipes'
  require 'capistrano/ext/multistage' # only require if you've installed Cap ext gem

If you’re running Phusion Passenger (www.modrails.com) be sure you add this line to config/deploy.rb:

  set :server, :passenger

Copyright

Copyright © 2009 Webficient LLC, Phil Misiowiec. See LICENSE for details.