Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
Merge pull request #63 from sul-dlss/cap-updates
Browse files Browse the repository at this point in the history
capistrano updates to current best practices
  • Loading branch information
peetucket committed Jun 19, 2017
2 parents af5e506 + 9703de7 commit aaff7ca
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
8 changes: 1 addition & 7 deletions config/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
set :application, 'was-registrar'
set :repo_url, 'https://github.com/sul-dlss/was-registrar.git'
set :deploy_host, "was-registrar-#{fetch(:stage)}.stanford.edu"
set :user, 'was'

# Default branch is :master
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call

# Default deploy_to directory is /var/www/my_app
set :deploy_to, "/opt/app/#{fetch(:user)}/#{fetch(:application)}"

server fetch(:deploy_host), user: fetch(:user), roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!
set :deploy_to, "/opt/app/was/was-registrar"

# Default value for :format is :pretty
# set :format, :pretty
Expand Down
4 changes: 4 additions & 0 deletions config/deploy/dev.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set :bundle_without, %w{deployment test}.join(' ')
set :deploy_environment, 'development'
set :rails_env, fetch(:deploy_environment)

server 'was-registrar-dev.stanford.edu', user: 'was', roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!
4 changes: 4 additions & 0 deletions config/deploy/prod.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set :bundle_without, %w{deployment development test}.join(' ')
set :deploy_environment, 'production'
set :rails_env, fetch(:deploy_environment)

server 'was-registrar-prod.stanford.edu', user: 'was', roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!
4 changes: 4 additions & 0 deletions config/deploy/stage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
set :deploy_environment, 'production'
set :rails_env, fetch(:deploy_environment)
set :honeybadger_env, 'stage'

server 'was-registrar-stage.stanford.edu', user: 'was', roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!

0 comments on commit aaff7ca

Please sign in to comment.