/
Capfile
34 lines (29 loc) · 898 Bytes
/
Capfile
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
require 'capistrano/version'
require 'rubygems'
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
# standard settings
set :application, "rdocinfo"
set :domain, "rdoc.info"
role :app, domain
role :web, domain
role :db, domain, :primary => true
# environment settings
set :user, "deploy"
set :group, "deploy"
set :deploy_to, "/var/www/apps/#{application}"
set :deploy_via, :remote_cache
default_run_options[:pty] = true
# scm settings
set :repository, "git://github.com/zapnap/rdocinfo.git"
set :scm, "git"
set :branch, "master"
#set :git_enable_submodules, 1
namespace :deploy do
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
task :after_update_code, :roles => [:app] do
run "ln -s #{shared_path}/config/production.yml #{release_path}/config/production.yml"
run "ln -s #{shared_path}/assets/rdoc/default #{release_path}/public/rdoc"
end
end