Browse Source

multistage

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
1a537c948c
  1. 1
      Gemfile
  2. 3
      Gemfile.lock
  3. 15
      config/deploy.rb
  4. 6
      config/deploy/production.rb
  5. 7
      config/deploy/staging.rb

1
Gemfile

@ -40,6 +40,7 @@ gem 'dalli', '~> 1.1.3'
group :development do
gem 'capistrano', '~> 2.9.0'
gem 'capistrano-ext', '~> 1.2.1'
gem 'mongrel', '>= 1.2.0.pre2'
end

3
Gemfile.lock

@ -54,6 +54,8 @@ GEM
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@ -236,6 +238,7 @@ DEPENDENCIES
active_scaffold!
cancan (~> 1.6.7)
capistrano (~> 2.9.0)
capistrano-ext (~> 1.2.1)
capybara (~> 1.1.1)
coffee-rails (~> 3.2.1)
compass (~> 0.12.alpha.0)

15
config/deploy.rb

@ -1,13 +1,10 @@
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
default_run_options[:pty] = true
set :application, 'entrydns'
set :domain, 'n0.entrydns.net'
task :staging do
set :domain, 'staging.entrydns.net'
set :port, 2212
end
set :repository, "git@bitbucket.org:clyfe/entrydns.git"
set :deploy_to, '/srv/www/apps/entrydns'
@ -21,12 +18,6 @@ set :deploy_via, :remote_cache
# set :git_enable_submodules,
# set :scm_passphrase, "passwd0" # the deploy user's password
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
# role :db, "your slave db-server here"
after 'deploy:update_code', 'deploy:symlink_database_yml'
after 'deploy:update_code', 'deploy:symlink_settings_yml'

6
config/deploy/production.rb

@ -0,0 +1,6 @@
set :domain, 'n0.entrydns.net'
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
# role :db, "your slave db-server here"

7
config/deploy/staging.rb

@ -0,0 +1,7 @@
set :domain, 'staging.entrydns.net'
set :port, 2212
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
# role :db, "your slave db-server here"
Loading…
Cancel
Save