diff options
| author | Tyler Mercier <tylermercier@gmail.com> | 2013-07-26 09:13:15 -0600 |
|---|---|---|
| committer | Tyler Mercier <tylermercier@gmail.com> | 2013-07-26 09:13:15 -0600 |
| commit | c48137d5377f5fe052a1e5c8f4e521110e5e1968 (patch) | |
| tree | 498e77c5bf866f8c710d0a894149cf8ffc85a438 | |
| parent | 74dbdc24e3a3db9470d4219eab19c27881748c90 (diff) | |
switch to copy deployments. add environment config receipe. add qa environment
| -rw-r--r-- | config/deploy.rb | 18 | ||||
| -rw-r--r-- | config/deploy/mo.rb | 9 | ||||
| -rw-r--r-- | config/deploy/prod.rb (renamed from config/deploy/production.rb) | 6 | ||||
| -rw-r--r-- | config/deploy/qa.rb | 1 | ||||
| -rw-r--r-- | config/recipes/environments.rb | 5 |
5 files changed, 16 insertions, 23 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 51d6aee..d366501 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,29 +1,23 @@ require "bundler/capistrano" -set :stages, %w(production mo) # this needs to be set before 'capistrano/ext/multistage' is required in -set :default_stage, "production" # this needs to be set before 'capistrano/ext/multistage' is required in -require 'capistrano/ext/multistage' +load "config/recipes/environments" load "config/recipes/base" load "config/recipes/nginx" load "config/recipes/unicorn" load "config/recipes/postgresql" load "config/recipes/nodejs" load "config/recipes/rbenv" -load "config/recipes/check" load "config/recipes/newrelic" set :application, "parley" set :user, "deployer" -set :deploy_to, "/home/#{user}/apps/#{application}" -set :deploy_via, :remote_cache # keeps git repo on server cache set :use_sudo, false - -set :scm, "git" -set :branch, "master" -set :repository, "git@github.com:madebyuppercut/parley.git" - default_run_options[:pty] = true # password prompt -ssh_options[:forward_agent] = true # no deploy key for github + +set :scm, :none +set :repository, "." +set :deploy_via, :copy +set :deploy_to, "/home/#{user}/apps/#{application}" after "deploy:update_code", "deploy:migrate" after "deploy", "deploy:cleanup" # keep only the last 5 releases diff --git a/config/deploy/mo.rb b/config/deploy/mo.rb index 7a4aa1a..8303ec5 100644 --- a/config/deploy/mo.rb +++ b/config/deploy/mo.rb @@ -1,8 +1 @@ -# Your HTTP server, Apache/etc -role :web, "192.241.151.56" -# This may be the same as your `Web` server -role :app, "192.241.151.56" -# This is where Rails migrations will run -role :db, "192.241.151.56", primary: true - -set :branch, "mo" +server "192.241.151.56", :web, :app, :db, primary: true diff --git a/config/deploy/production.rb b/config/deploy/prod.rb index b4224ee..90192d5 100644 --- a/config/deploy/production.rb +++ b/config/deploy/prod.rb @@ -1,8 +1,8 @@ # Your HTTP server, Apache/etc -role :web, "www.parleytool.com" +role :web, "198.199.101.128" # This may be the same as your `Web` server -role :app, "www.parleytool.com" +role :app, "198.199.101.128" # This is where Rails migrations will run -role :db, "www.parleytool.com", primary: true +role :db, "198.199.101.128", primary: true #role :db, "your slave db-server here" diff --git a/config/deploy/qa.rb b/config/deploy/qa.rb new file mode 100644 index 0000000..1d031f0 --- /dev/null +++ b/config/deploy/qa.rb @@ -0,0 +1 @@ +server "192.241.204.27", :web, :app, :db, primary: true diff --git a/config/recipes/environments.rb b/config/recipes/environments.rb new file mode 100644 index 0000000..cee0993 --- /dev/null +++ b/config/recipes/environments.rb @@ -0,0 +1,5 @@ +set :stages, %w(prod qa mo) +set :default_stage, "qa" + +# this needs to be set last +require 'capistrano/ext/multistage' |
