Capistrano recipes to make it easier for me to deploy to one of my linode servers. By default it assumes the project can be found in my github account.
Open up your Gemfile and add at the bottom this line:
group :development do gem "roundersrecipes", :git => "git@github.com:rounders/roundersrecipes.git", :require => false end
Now, run:
$ bundle install
Start by capifying your project as follows
$ capify .
Then edit config/deploy.rb and make it look as follows:
load 'deploy/assets' require "bundler/capistrano" set :application, "your_application_name" require 'roundersrecipes/linode2'
Now you can run the various deploy recipes:
$ bundle exec cap deploy:setup $ bundle exec cap deploy:cold $ bundle exec cap deploy
If you want to deploy from the local git repository, add the following lines after the require ‘roundersrecipes/linode2’ line:
set :repository, File.expand_path("../../.git", __FILE__) set :deploy_via, :copy
If you need to link additional folders from public to shared do you can do the following:
set :shared_children, %w(system log pids config photos) namespace :deploy do after "deploy:symlink", :link_shared_paths end task :link_shared_paths do run <<-CMD cd #{release_path} && ln -s #{shared_path}/photos #{release_path}/public/photo CMD end
Please see MIT-LICENSE for more details.
Copyright © 2011 Rounders Consulting Inc.