Commit d2e3a0219646dc7edc4df0103ae07335f4b3a61b
1 parent
032340ef
Exists in
master
and in
1 other branch
Deployment config at config/config.example.yml.
Showing
2 changed files
with
16 additions
and
6 deletions
Show diff stats
config/config.example.yml
| @@ -39,6 +39,16 @@ user_has_username: false | @@ -39,6 +39,16 @@ user_has_username: false | ||
| 39 | # but you want to leave a short comment. | 39 | # but you want to leave a short comment. |
| 40 | allow_comments_with_issue_tracker: true | 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 | # Configure SMTP settings. If you are running Errbit on Heroku, | 52 | # Configure SMTP settings. If you are running Errbit on Heroku, |
| 43 | # sendgrid will be configured by default. | 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,13 +11,13 @@ config = YAML.load_file('config/config.yml')['deployment'] || {} | ||
| 11 | require 'bundler/capistrano' | 11 | require 'bundler/capistrano' |
| 12 | 12 | ||
| 13 | set :application, "errbit" | 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 | set :use_sudo, false | 21 | set :use_sudo, false |
| 22 | if config.has_key?('ssh_key') | 22 | if config.has_key?('ssh_key') |
| 23 | set :ssh_options, { :forward_agent => true, :keys => [ config['ssh_key'] ] } | 23 | set :ssh_options, { :forward_agent => true, :keys => [ config['ssh_key'] ] } |
| @@ -26,7 +26,7 @@ else | @@ -26,7 +26,7 @@ else | ||
| 26 | end | 26 | end |
| 27 | default_run_options[:pty] = true | 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 | set :deploy_via, :remote_cache | 30 | set :deploy_via, :remote_cache |
| 31 | set :copy_cache, true | 31 | set :copy_cache, true |
| 32 | set :copy_exclude, [".git"] | 32 | set :copy_exclude, [".git"] |