Skip to content

Instantly share code, notes, and snippets.

@scharfie
Forked from dburger/gist:28214
Created February 20, 2010 01:08
Show Gist options
  • Save scharfie/309412 to your computer and use it in GitHub Desktop.
Save scharfie/309412 to your computer and use it in GitHub Desktop.
# modifications from standard capistrano deploy as taken from:
# http://devthatweb.com/view/deploy-any-project-using-capistrano-2
set :application, "name removed"
set :repository, "url to trunk of repo"
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
set :deploy_to, "/var/www/#{application}"
# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion
set :domain, 'our domain removed'
role :app, domain
role :web, domain
role :db, domain, :primary => true
namespace :deploy do
task :setup, :except => { :no_release => true } do
dirs = [deploy_to, releases_path, shared_path]
dirs += %w(system).map { |d| File.join(shared_path, d) }
run "umask 02 && mkdir -p #{dirs.join(' ')}"
end
# Also overwritten to remove Rails-specific code.
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{release_path}" if fetch(:group_writable, true)
end
task :migrate do
end
task :migrations do
end
task :cold do
end
task :start do
end
task :stop do
end
task :restart do
end
end
desc "remove the Capfile and config"
task :after_update_code do
run "rm #{release_path}/Capfile"
run "rm -rf #{release_path}/config"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment