Commit d2e3a0219646dc7edc4df0103ae07335f4b3a61b

Authored by Nick Recobra
1 parent 032340ef
Exists in master and in 1 other branch production

Deployment config at config/config.example.yml.

config/config.example.yml
... ... @@ -39,6 +39,16 @@ user_has_username: false
39 39 # but you want to leave a short comment.
40 40 allow_comments_with_issue_tracker: true
41 41  
  42 +# Setup your deploy options
  43 +deployment:
  44 + hosts:
  45 + web: errbit.example.com
  46 + app: errbit.example.com
  47 + db: errbit.example.com
  48 + repository: http://github.com/errbit/errbit.git
  49 + user: deploy
  50 + deploy_to: /var/www/apps/errbit
  51 +
42 52 # Configure SMTP settings. If you are running Errbit on Heroku,
43 53 # sendgrid will be configured by default.
44 54 # ------------------------------------------------------------------------
... ...
config/deploy.example.rb
... ... @@ -11,13 +11,13 @@ config = YAML.load_file('config/config.yml')['deployment'] || {}
11 11 require 'bundler/capistrano'
12 12  
13 13 set :application, "errbit"
14   -set :repository, config['repository'] || "http://github.com/errbit/errbit.git"
  14 +set :repository, config['repository']
15 15  
16   -role :web, config['hosts']['web'] || "errbit.example.com"
17   -role :app, config['hosts']['app'] || "errbit.example.com"
18   -role :db, config['hosts']['db'] || "errbit.example.com", :primary => true
  16 +role :web, config['hosts']['web']
  17 +role :app, config['hosts']['app']
  18 +role :db, config['hosts']['db'], :primary => true
19 19  
20   -set :user, config['user'] || :deploy
  20 +set :user, config['user']
21 21 set :use_sudo, false
22 22 if config.has_key?('ssh_key')
23 23 set :ssh_options, { :forward_agent => true, :keys => [ config['ssh_key'] ] }
... ... @@ -26,7 +26,7 @@ else
26 26 end
27 27 default_run_options[:pty] = true
28 28  
29   -set :deploy_to, config['deploy_to'] || "/var/www/apps/#{application}"
  29 +set :deploy_to, config['deploy_to']
30 30 set :deploy_via, :remote_cache
31 31 set :copy_cache, true
32 32 set :copy_exclude, [".git"]
... ...