Commit 525225e87ad9626afd434d5a111659a65980372d
- Diff rendering mode:
- inline
- side by side
config/deploy.rb
(10 / 10)
|   | |||
| 1 | 1 | set :application, 'gitorious' | |
| 2 | 2 | ||
| 3 | role :app, 'int.sonianarchive.com' | ||
| 4 | role :web, 'int.sonianarchive.com' | ||
| 5 | role :db, 'int.sonianarchive.com', :primary => true | ||
| 3 | role :app, 'git.sonianarchive.com' | ||
| 4 | role :web, 'git.sonianarchive.com' | ||
| 5 | role :db, 'git.sonianarchive.com', :primary => true | ||
| 6 | 6 | ||
| 7 | 7 | depend :remote, :command, 'gem' | |
| 8 | 8 | depend :remote, :gem, 'rails', '>=2.0.2' | |
| … | … | ||
| 13 | 13 | depend :remote, :gem, 'chronic', '>=0.2.3' | |
| 14 | 14 | depend :remote, :gem, 'rmagick', '>=2.3.0' | |
| 15 | 15 | ||
| 16 | set :use_sudo, false | ||
| 17 | set :user, 'git' | ||
| 18 | set :deploy_to, "/var/www/#{application}" | ||
| 19 | |||
| 20 | 16 | set :scm, :git | |
| 21 | set :repository, "git@git.sonianarchive.com:#{application}/mainline.git" | ||
| 22 | set :repository_cache, "git-cache" | ||
| 23 | 17 | set :ssh_options, { :forward_agent => true } | |
| 24 | set :deploy_via, :remote_cache | ||
| 18 | set :repository, "/var/git/#{application}/mainline.git" | ||
| 19 | set :repository_cache, "git-cache" | ||
| 25 | 20 | # set :branch, "master" | |
| 21 | set :deploy_to, "/var/www/#{application}" | ||
| 22 | set :deploy_via, :remote_cache | ||
| 26 | 23 | ||
| 27 | 24 | DATABASE_YML = ERB.new <<-EOF | |
| 28 | 25 | base: &base | |
| … | … | ||
| 52 | 52 | run "mkdir -p #{shared_path}/config" | |
| 53 | 53 | put DATABASE_YML.result, "#{shared_path}/config/database.yml" | |
| 54 | 54 | put GITORIOUS_YML.result, "#{shared_path}/config/gitorious.yml" | |
| 55 | run "umask 02 && mkdir -p #{shared_path}/public/images/graphs" | ||
| 55 | 56 | end | |
| 56 | 57 | ||
| 57 | 58 | after "deploy:update_code" do | |
| … | … | ||
| 60 | 60 | #{release_path}/config/database.yml" | |
| 61 | 61 | run "ln -nfs #{shared_path}/config/gitorious.yml \ | |
| 62 | 62 | #{release_path}/config/gitorious.yml" | |
| 63 | run "ln -nfs #{shared_path}/public/images/graphs \ | ||
| 64 | #{release_path}/public/images/graphs" | ||
| 63 | 65 | end | |
| 64 | 66 | ||
| 65 | 67 | namespace :deploy do |

