forked from jjulian/bmoreonrails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCapfile
39 lines (31 loc) · 1 KB
/
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
35
36
37
38
39
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :application, "bmoreonrails"
set :scm, "git"
set :repository, "[email protected]:jjulian/bmoreonrails.git"
set :branch, "master"
set :deploy_via, :remote_cache
role :web, "67.207.150.229"
set :user, "www-data"
set :use_sudo, false
set :deploy_to, "/var/www/bmoreonrails"
# custom
set :stay_with_a_local_root, "/var/www/stay-with-a-local/public"
set :ride_with_a_local_root, "/var/www/ride-with-a-local/current/public"
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart do ; end
task :migrate do ; end
task :migrations do ; end
task :cold do ; end
end
task :generate do
rake = fetch(:rake, "rake")
run "cd #{current_release} && #{try_sudo} #{rake} generate"
end
task :symlink_apps do
run "ln -s #{stay_with_a_local_root} #{current_release}/public/stay-with-a-local"
run "ln -s #{ride_with_a_local_root} #{current_release}/public/ride-with-a-local"
end
after :deploy, :generate
after :deploy, :symlink_apps