Skip to content

Commit

Permalink
Refactor dynamic cap profile to deploy to all servers (#2306)
Browse files Browse the repository at this point in the history
  • Loading branch information
phuongdh authored and bkeese committed Sep 11, 2017
1 parent 847f722 commit be86009
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
16 changes: 9 additions & 7 deletions config/deploy/dynamic.rb
@@ -1,15 +1,17 @@
# Example:
# DB=postgres REPO=git@github.com:user/avalon.git BRANCH=deploy/prod USER=deploy APP_HOST=avalon.example.edu cap dynamic deploy

set :bundle_flags, "--with #{ENV['DB']}" if ENV['DB']
set :bundle_without, 'development test debug'
set :rails_env, ENV['RAILS_ENV'] || 'production'
set :bundle_flags, "--with #{ENV['DB']}" if ENV['DB']
set :bundle_without, ENV['RAILS_ENV'] == "development" ? "production" : 'development test debug'
set :repo_url, ENV['REPO']
set :branch, ENV['BRANCH']
set :deploy_to, ENV['DEPLOY_TO']
set :hls_dir, ENV['HLS_DIR']
set :user, ENV['USER']
role :web, ENV['APP_HOST']
role :app, ENV['APP_HOST']
role :resque_worker, ENV['RESQUE_HOST'] || ENV['APP_HOST']
role :resque_scheduler, ENV['RESQUE_HOST'] || ENV['APP_HOST']
server ENV['APP_HOST'], roles: %w{web app}, user: ENV['USER'] || 'avalon'
server ENV['RESQUE_HOST'] || ENV['APP_HOST'], roles: %w{resque_worker resque_scheduler}, user: ENV['RESQUE_USER'] || 'avalon'
append :linked_files, ENV['LINKED_FILES'] if ENV['LINKED_FILES']

set :workers, { "*" => 2 }

set :workers, { "*" => 2 }
9 changes: 0 additions & 9 deletions config/deploy/mallorn.rb

This file was deleted.

9 changes: 0 additions & 9 deletions config/deploy/spruce.rb

This file was deleted.

0 comments on commit be86009

Please sign in to comment.