Skip to content

Commit

Permalink
Merge pull request #66 from curationexperts/capify
Browse files Browse the repository at this point in the history
Initial capification
  • Loading branch information
mark-dce committed Apr 10, 2017
2 parents d978b14 + aaecc8f commit 9ef5a2c
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 2 deletions.
37 changes: 37 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
require "capistrano/deploy"
require 'capistrano/bundler'
require "capistrano/passenger"
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
# require "capistrano/rvm"
# require "capistrano/rbenv"
# require "capistrano/chruby"

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
12 changes: 10 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gem 'hyrax', '1.0.0.rc1'
gem 'jbuilder', '~> 2.5'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
Expand All @@ -23,13 +24,14 @@ gem 'rsolr', '~> 1.0'
gem 'sass-rails', '~> 5.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'therubyracer'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

gem 'yard'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

Expand Down Expand Up @@ -58,6 +60,10 @@ group :development, :test do
end

group :development do
gem 'capistrano'
gem 'capistrano-bundler'
gem 'capistrano-passenger'
gem 'capistrano-rails'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the
# background. Read more: https://github.com/rails/spring
Expand All @@ -66,5 +72,7 @@ group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere
# in the code.
gem 'web-console', '>= 3.3.0'
gem 'yard'
end

extra_gems = "/opt/laevigata/shared/Gemfile.local"
eval File.read(extra_gems) if File.exist?(extra_gems) # rubocop:disable Security/Eval
33 changes: 33 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ GEM
tzinfo (~> 1.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
airbrussh (1.1.2)
sshkit (>= 1.6.1, != 1.7.0)
almond-rails (0.0.3)
rails (>= 4.2, < 6)
arel (7.1.4)
Expand Down Expand Up @@ -126,6 +128,19 @@ GEM
builder (3.2.3)
byebug (9.0.6)
cancancan (1.16.0)
capistrano (3.8.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (1.2.0)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-passenger (0.2.0)
capistrano (~> 3.0)
capistrano-rails (1.2.3)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capybara (2.13.0)
addressable
mime-types (>= 1.16)
Expand Down Expand Up @@ -388,6 +403,7 @@ GEM
slop
legato (0.7.0)
multi_json
libv8 (3.16.14.19)
link_header (0.0.8)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand Down Expand Up @@ -417,6 +433,9 @@ GEM
multipart-post (2.0.0)
nest (2.1.0)
redic
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (4.1.0)
nio4r (2.0.0)
noid (0.9.0)
nokogiri (1.7.1)
Expand All @@ -439,6 +458,7 @@ GEM
os (0.9.6)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.20.0)
posix-spawn (0.3.13)
power_converter (0.1.2)
powerpack (0.1.1)
Expand Down Expand Up @@ -515,6 +535,7 @@ GEM
redis (~> 3.0, >= 3.0.4)
redlock (0.1.8)
redis (~> 3, >= 3.0.0)
ref (2.0.0)
representable (3.0.3)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
Expand Down Expand Up @@ -618,11 +639,17 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
sshkit (1.13.1)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stomp (1.4.3)
sxp (1.0.0)
rdf (~> 2.0)
term-ansicolor (1.5.0)
tins (~> 1.0)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.7)
Expand Down Expand Up @@ -669,6 +696,10 @@ PLATFORMS
DEPENDENCIES
bixby
byebug
capistrano
capistrano-bundler
capistrano-passenger
capistrano-rails
capybara (~> 2.8)
coffee-rails (~> 4.2)
coveralls
Expand All @@ -681,6 +712,7 @@ DEPENDENCIES
jquery-rails
launchy
listen (~> 3.0.5)
pg
puma (~> 3.0)
rails (~> 5.0.2)
rsolr (~> 1.0)
Expand All @@ -692,6 +724,7 @@ DEPENDENCIES
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
therubyracer
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
Expand Down
65 changes: 65 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# config valid only for current version of Capistrano
lock "3.8.0"

set :application, "laevigata"
set :repo_url, "https://github.com/curationexperts/laevigata.git"
set :deploy_to, '/opt/laevigata'

set :log_level, :debug
set :bundle_flags, '--deployment'
set :bundle_env_variables, nokogiri_use_system_libraries: 1

set :keep_releases, 5
set :passenger_restart_with_touch, true
set :assets_prefix, "#{shared_path}/public/assets"

SSHKit.config.command_map[:rake] = 'bundle exec rake'

# Default branch is :master
set :branch, ENV['REVISION'] || ENV['BRANCH_NAME'] || 'master'

set :linked_dirs, %w[
tmp/pids
tmp/cache
tmp/sockets
public/assets
]

set :linked_files, %w[
config/blacklight.yml
config/database.yml
config/fedora.yml
config/redis.yml
config/resque-pool.yml
config/role_map.yml
config/secrets.yml
config/solr.yml
]

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

# Default deploy_to directory is /var/www/my_app_name
# set :deploy_to, "/var/www/my_app_name"

# Default value for :format is :airbrussh.
# set :format, :airbrussh

# You can configure the Airbrussh format using :format_options.
# These are the defaults.
# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto

# Default value for :pty is false
# set :pty, true

# Default value for :linked_files is []
# append :linked_files, "config/database.yml", "config/secrets.yml"

# Default value for linked_dirs is []
# append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }

# Default value for keep_releases is 5
# set :keep_releases, 5
4 changes: 4 additions & 0 deletions config/deploy/aws.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# deploys to DCE sandbox
set :stage, :aws
set :rails_env, 'production'
server 'emory.curationexperts.com', user: 'deploy', roles: [:web, :app, :db, :resque_pool]

0 comments on commit 9ef5a2c

Please sign in to comment.