-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCapfile
54 lines (43 loc) · 1.13 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
load 'deploy'
require 'bundler/capistrano'
require 'hipchat/capistrano'
set :stages, %w(demo staging production)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
set :user, 'utah'
set :application, 'lagunitas'
# domain is set in config/deploy/{stage}.rb
# file paths
set :repository, "[email protected]:utahstreetlabs/lagunitas.git"
set(:deploy_to) { "/home/#{user}/#{application}" }
# one server plays all roles
role :app do
fetch(:domain)
end
set(:rails_env) { stage }
set :deploy_via, :remote_cache
set :scm, 'git'
set :scm_verbose, true
set(:branch) do
case stage
when "production" then "master"
else "staging"
end
end
set :use_sudo, false
set :hipchat_token, '39019837fa847cfb17282ed5d3fbce'
set :hipchat_room_name, 'bots'
set :hipchat_announce, true
after "deploy", "deploy:cleanup"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "#{sudo} start lagunitas"
end
task :stop, :roles => :app, :except => { :no_release => true } do
run "#{sudo} stop lagunitas"
end
task :restart, :roles => :app, :except => { :no_release => true } do
stop
start
end
end