Created
November 5, 2009 19:42
-
-
Save mig/227325 to your computer and use it in GitHub Desktop.
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 'capistrano/version' | |
load 'deploy' | |
# Customize the following variables | |
set :domain, "host.example.com" | |
set :user, "username" | |
set :application, "my_wordpress_blog" | |
set :deploy_to, "/var/www/apps/#{application}" | |
# These variables probably don't need to change | |
set :repository, "file://#{File.expand_path('.')}" | |
server "#{domain}", :app, :web, :db, :primary => true | |
set :deploy_via, :copy | |
set :copy_exclude, [".git", ".DS_Store"] | |
set :scm, :git | |
set :branch, "master" | |
set :use_sudo, false | |
set :keep_releases, 2 | |
set :git_shallow_clone, 1 | |
namespace :deploy do | |
task :default do | |
transaction do | |
update_code | |
symlink | |
end | |
end | |
task :update_code, :except => { :no_release => true } do | |
on_rollback { run "rm -rf #{release_path}; true" } | |
strategy.deploy! | |
end | |
task :after_deploy do | |
cleanup | |
end | |
task :after_symlink do | |
run "ln -nfs #{shared_path}/uploads/#{current_path}/public/wp-content/uploads" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment