-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCapfile
57 lines (42 loc) · 1.24 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
load('deploy')
set :application, "tagbetter"
set :domain, "tagbetter.r09.railsrumble.com"
set :repository, '[email protected]:cgriego/tagbetter.git'
set :use_sudo, false
set :deploy_to, "/apps/#{application}"
set :scm, "git"
set :user, 'deploy'
role :app, domain
namespace :deploy do
task :start, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end
task :stop, :roles => :app do
# Do nothing.
end
desc "Restart application"
task :restart, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end
end
namespace :tagbetter do
desc "Update the Apache virtual host for the application"
task :update_vhost, :roles => :app do
sudo "cp #{current_release}/config/tagbetter.conf /etc/apache2/sites-available/tagbetter"
sudo '/etc/init.d/apache2 reload'
end
desc "Install gem dependencies"
task :gems, :roles => :app do
run "cd #{current_release} && rake tagbetter:gems"
end
desc "Create the CouchDB application database"
task :create_db, :roles => :app do
run "cd #{current_release} && rake couchdb:create"
end
end
namespace :couchdb do
desc "Start CouchDB"
task :start, :roles => :app do
sudo "/usr/local/bin/couchdb -b"
end
end