2nd try at pasting deploy.rb. (I obviously don't know how to use gist
with this group.)
git://
gist.github.com/247261.git
set :user, "remote_user"
set :application, "core"
set :scm, "git"
set :repository, "ssh://
www.myapp.com/home/jamie/git/myapp.git"
set :branch, "master"
set :scm_verbose, true
set :use_sudo, false
#
=============================================================================
# Deploy core application in development environment.
#
=============================================================================
desc "Set configuration variables for the development environment."
task :dev do
role :web, "
dev.myapp.com"
role :app, "
dev.myapp.com"
role :db, "
dev.myapp.com", :primary => true
set :deploy_to, "/home/#{user}/
myapp.dev"
end
#
=============================================================================
# Deploy core application in production environment.
#
=============================================================================
desc "Set configuration variables for the production environment."
task :production do
role :web, "
www.myapp.com"
role :app, "
www.myapp.com"
role :db, "
www.myapp.com", :primary => true
set :deploy_to, "/var/www/myapp"
end
#
=============================================================================
# Tasks to Restart the application.
#
=============================================================================
namespace :deploy do
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end