Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
base capistrano configuration with bunlder and passenger
require 'bundler/capistrano'
set :application, "APPNAME"
set :domain, ""
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, "git@g....git"
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"
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')}"
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
You can’t perform that action at this time.