1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
require "bundler/capistrano"
set :application, "leap-website"
set :deploy_to, "/home/website/leap-website"
set :user, "website"
set :scm, :git
set :repository, "ssh://gitolite@leap.se:22/leap_website"
set :branch, "master"
set :deploy_via, :remote_cache
ssh_options[:forward_agent] = true
ssh_options[:port] = 22
role :web, "leap.se"
role :app, "leap.se"
set :use_sudo, false
set :keep_releases, 10
after "deploy:restart", "deploy:cleanup"
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
namespace :leap do
task :link_to_chiliproject do
run "rm -f #{current_release}/public/code"
run "ln -s /var/www/chili/public #{current_release}/public/code"
end
end
after "deploy:create_symlink", "leap:link_to_chiliproject"
|