2008/07/22

Capistrano, git, rails again.

set :use_sudo, false
# ====================================================
# CUSTOM OPTIONS
# ====================================================
set :user, "deploy"
set :runner, user
set :application, "go.go.com"
set :domain, "xx.xx.xx.xx."

role :app, application
role :web, application
role :db, application, :primary => true

# ====================================================
# DATABASE OPTIONS
# ====================================================
set :rails_env, "production"

# ====================================================
# DEPLOY TO
# ====================================================
set :deploy_to, "/home/#{user}/public/#{application}"

# ====================================================
# REPOSITORY
# ====================================================
set :scm, :git
set :deploy_via, :remote_cache
set :repository, "ssh://deploy@xx.xx.xx.xx:xxxx/var/git/ext_kocm.git"
set :repository_cache, "git_cache"

# ====================================================
# REPOSITORY
# ====================================================
set :ssh_options, { :forward_agent => true }
default_run_options[:pty] = true
set :port, 30003 #ssh port

# ====================================================
# Tasks
# ====================================================
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => {:no_release => true} do
run "touch ${current_path}/tmp/restart.txt"
end

[:start, :stop].each do |t|
desc "#{t} task is a no-op with modrails"
task t, :roles => :app do; end
end
end
blog comments powered by Disqus