Skip to content

Commit

Permalink
upgrade Capistrano deploy scripties
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Hardy committed Mar 31, 2016
1 parent 39fc599 commit 5a2b105
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ require 'capistrano/deploy'
# require 'capistrano/rails/migrations'

require 'capistrano/bundler'
require 'capistrano/passenger'
require 'capistrano/rails'
require 'capistrano/passenger'
require 'dlss/capistrano'
require 'squash/rails/capistrano3'
require 'squash/rails/capistrano3' # Note that this inclusion requires a branch, not a tag, to be deployed

# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
9 changes: 4 additions & 5 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
lock '3.4.0'

set :application, 'sul-pub'
set :repo_url, '[email protected]:sul-dlss/sul-pub.git'
set :user, 'pub'
set :repo_url, "[email protected]:sul-dlss/#{fetch(:application)}.git"
set :ssh_options, keys: [Capistrano::OneTimeKey.temporary_ssh_private_key_path],
forward_agent: true,
auth_methods: %w(publickey password)

# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, '/home/***REMOVED***/sulbib'
set :home_directory, "/opt/app/#{fetch(:user)}"
set :deploy_to, "#{fetch(:home_directory)}/#{fetch(:application)}"

# Default branch is the current checkout branch
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
Expand All @@ -32,5 +33,3 @@
)

before 'deploy:publishing', 'squash:write_revision'

# set :bundle_audit_ignore, %w(CVE-2015-3226)
8 changes: 0 additions & 8 deletions config/deploy/dev_solo.rb

This file was deleted.

8 changes: 2 additions & 6 deletions config/deploy/development.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
server 'sulcap-dev.stanford.edu', user: '***REMOVED***', roles: %w(web db app)
server 'sul-pub-dev.stanford.edu', user: fetch(:user), roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!

set :rails_env, 'development'
set :deploy_via, :copy

# This is a development box, do not exclude development gems.
set :bundle_without, 'test'
set :bundle_without, %w(test).join(' ')
7 changes: 4 additions & 3 deletions config/deploy/production.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
server 'sulcap-prod.stanford.edu', user: '***REMOVED***', roles: %w(web db app)
server 'sul-pub-prod.stanford.edu', user: fetch(:user), roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!

set :rails_env, 'production'
set :deploy_via, :copy
set :bundle_without, %w(test development).join(' ')

set :log_level, :info
7 changes: 5 additions & 2 deletions config/deploy/qa.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
server 'sulcap-qa.stanford.edu', user: '***REMOVED***', roles: %w(web db app)
server 'sul-pub-qa.stanford.edu', user: fetch(:user), roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!

set :rails_env, 'production'
set :deploy_via, :copy

set :bundle_without, %w(test development).join(' ')

set :log_level, :info
9 changes: 9 additions & 0 deletions config/deploy/staging.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server 'sul-pub-stage.stanford.edu', user: fetch(:user), roles: %w(web db app)

Capistrano::OneTimeKey.generate_one_time_key!

set :rails_env, 'production'

set :bundle_without, %w(test development).join(' ')

set :log_level, :info
17 changes: 0 additions & 17 deletions config/deploy/sul-pub-dev.rb

This file was deleted.

0 comments on commit 5a2b105

Please sign in to comment.