-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCapfile
52 lines (43 loc) · 1.25 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
load 'deploy' if respond_to?(:namespace)
set :application, 'tasket'
set :user, 'sinatra'
set :password, '$1u3tOUST0aC!ie'
set :domain, '209.20.80.6'
ssh_options[:port] = 8560
default_run_options[:pty] = true
set :scm, :git
set :scm_passphrase, "f00lessthanb4r"
set :repository, "[email protected]:bisceglie/tasket.git"
set :deploy_via, :remote_cache
set :deploy_to, "/home/sinatra/#{application}"
set :branch, 'master'
set :git_shallow_clone, 1
set :scm_verbose, true
set :use_sudo, false
role :app, "209.20.80.6"
role :web, "209.20.80.6"
role :db, "209.20.80.6", :primary => true
set :runner, user
set :admin_runner, user
namespace :deploy do
task :start, :roles => [:web, :app] do
run "cd #{deploy_to}/current && nohup thin -C thin/production_config.yml -R config.ru start"
end
task :stop, :roles => [:web, :app] do
run "cd #{deploy_to}/current && nohup thin -C thin/production_config.yml -R config.ru stop"
end
task :restart, :roles => [:web, :app] do
deploy.stop
deploy.start
end
# This will make sure that Capistrano doesn't try to run rake:migrate (this is not a Rails project!)
task :cold do
deploy.update
deploy.restart
end
end
namespace :tasket do
task :log do
run "cat #{deploy_to}/current/log/thin.log"
end
end