-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCapfile
43 lines (33 loc) · 1.07 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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :user, "racks2010"
set :application, "racks"
set :repository, "git://github.com/openminds/racks.git"
server 'service-001.openminds.be', :app, :web, :db, :primary => true
set :whenever_command, "bundle exec whenever"
begin
require 'openminds_deploy/defaults'
require 'openminds_deploy/git'
require 'openminds_deploy/passenger'
require 'openminds_deploy/rails3'
require 'whenever/capistrano'
require 'thinking_sphinx/deploy/capistrano'
end
#Shared secerts aren't in version control
namespace :secretsconfig do
desc "Create secrets.yml in shared/config"
task :copy_secrets_config do
run "mkdir -p #{shared_path}/config"
put File.read('config/secrets.yml'), "#{shared_path}/config/secrets.yml"
end
desc "Link in the production secrets.yml"
task :link do
run "ln -nfs #{shared_path}/config/secrets.yml #{release_path}/config/secrets.yml"
end
end
after('deploy:update_code') do
secretsconfig.link
thinking_sphinx.rebuild
end
after 'deploy:setup' do
secretsconfig.copy_secrets_config
end