Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor dynamic cap profile to deploy to all servers (#2306)
- Loading branch information
Showing
3 changed files
with
9 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.