-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Wojciech Wnętrzak
committed
Jun 29, 2011
1 parent
45c15b6
commit 0499775
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | ||
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | ||
|
||
load 'config/deploy' # remove this line to skip loading any of the default tasks |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
require "bundler/capistrano" | ||
|
||
set :application, "peergroup" | ||
set :user, "peergroup" | ||
set :deploy_to, "/var/www/vhosts/kb.ihloff.de/htdocs/peergroup" | ||
|
||
set :domain, "s15395856.onlinehome-server.info" | ||
set :rails_env, "production" | ||
|
||
role :app, domain | ||
role :web, domain | ||
role :db, domain, :primary => true | ||
|
||
set :scm, :git | ||
set :repository, "git://github.com/wolfgangihloff/peergroup.git" | ||
set :branch, "master" | ||
set :deploy_via, :remote_cache | ||
set :use_sudo, false | ||
|
||
# variables for bundler gem | ||
set :bundle_without, [:development, :test] | ||
|
||
after "deploy:update_code", "deploy:link" | ||
after "deploy", "deploy:cleanup" | ||
|
||
namespace :deploy do | ||
task :default do | ||
set :migrate_target, :latest | ||
update_code | ||
migrate | ||
symlink | ||
apache.restart | ||
end | ||
|
||
task :restart, :roles => :app, :except => {:no_release => true} do | ||
apache.restart | ||
end | ||
|
||
task :link do | ||
run "ln -nfs #{shared_path}/config/database.yml #{latest_release}/config/database.yml" | ||
run "ln -nfs #{shared_path}/config/redis.yml #{latest_release}/config/redis.yml" | ||
end | ||
|
||
namespace :apache do | ||
task :restart do | ||
run "touch #{File.join(current_path, 'tmp', 'restart.txt')}" | ||
end | ||
end | ||
end |