Report abuse

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
require "mt-capistrano"

set :site,         ""
set :application,  ""
set :webpath,      ""
set :domain,       "
set :user,         ""
set :password,     ""

set :use_sudo,     false

# repository 
set :scm, :git
set :repository, ""
set :scm_password, ""
set :deploy_to,    "/home/#{site}/containers/rails/#{application}"
set :current_deploy_dir, "#{deploy_to}/current"
set :deploy_via, :remote_cache
set :tmp_dir, "#{deploy_to}/tmp"
set :branch, "master"
set :git_enable_submodules, 1

set :checkout, "export"

# which environment to work in
set :rails_env,    "production"

# necessary for functioning on the (gs)
default_run_options[:pty] = true

# these shouldn't be changed
role :web, "#{domain}"
role :app, "#{domain}"
role :db,  "#{domain}", :primary => true


after "deploy:update_code".to_sym do
  put File.read("config/database.yml.mt"), "#{release_path}/config/database.yml", :mode => 0444
end

# update .htaccess rules after new version is deployed
after "deploy:symlink".to_sym, "mt:generate_htaccess".to_sym