public
Description: frth
Homepage:
Clone URL: git://github.com/bruce/frth.git
frth / Capfile
100644 48 lines (36 sloc) 1.052 kb
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
role :web, "codefluency.com"
role :app, "codefluency.com"
 
set :scm, :git
set :repository, 'git://github.com/bruce/frth.git'
 
set :user, 'frth'
set :deploy_to, "/var/www/apps/obamaftw"
set :deploy_via, :remote_cache
set :use_sudo, false
 
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
 
after "deploy:setup", :create_shared_directories
after "deploy:symlink", :link_shared_directories
after "deploy:symlink", "update_git_submodules"
 
task :create_shared_directories, :roles => [:app] do
  run "mkdir -p #{shared_path}/tmp"
  run "mkdir -p #{shared_path}/log"
end
    
task :update_git_submodules do
  run "cd #{current_path} && brigit update"
end
 
task :link_shared_directories do
  run "ln -nfs #{shared_path}/tmp #{release_path}/tmp"
  run "ln -nfs #{shared_path}/log #{release_path}/log"
end
  
# Passenger
namespace :deploy do
  desc "Restart Application"
  task :restart, :roles => :app do
    run "touch #{current_path}/tmp/restart.txt"
  end
 
  # Not needed
  task :start do
  end
 
  # Not needed
  task :stop do
  end
  
end