Created
January 21, 2011 12:39
-
-
Save skojin/789624 to your computer and use it in GitHub Desktop.
base capistrano configuration with bunlder and passenger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/capistrano' | |
set :application, "APPNAME" | |
set :domain, "mydomain.com" | |
set :user, "deployer" | |
set :password, "" | |
set :runner, user | |
default_run_options[:pty] = true # Must be set for the password prompt from git to work | |
set :repository, "[email protected]" | |
set :scm, "git" | |
set :scm_passphrase, "" | |
set :branch, "master" | |
set :deploy_via, :remote_cache | |
set :use_sudo, false | |
set :deploy_to, "/home/#{user}/sites/#{application}" | |
set :chmod755, "app config db lib public vendor script script/*" | |
set :normalize_asset_timestamps, false | |
role :app, domain | |
role :web, domain | |
role :db, domain, :primary => true | |
namespace :deploy do | |
task :setup_configs, :roles => :app do | |
run "ln -s #{shared_path}/database.yml #{release_path}/config/database.yml" | |
end | |
task :start do ; restart end | |
task :stop do ; end | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
run "touch #{File.join(current_path,'tmp','restart.txt')}" | |
end | |
end | |
after 'deploy:update_code', 'deploy:setup_configs', 'deploy:migrate' | |
after 'deploy', 'deploy:cleanup' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment