-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3b5b0b
commit 5ec4e11
Showing
8 changed files
with
137 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Load DSL and set up stages | ||
require 'capistrano/setup' | ||
|
||
# Include default deployment tasks | ||
require 'capistrano/deploy' | ||
|
||
require 'capistrano/scm/git' | ||
install_plugin Capistrano::SCM::Git | ||
|
||
require 'capistrano/bundler' | ||
require 'capistrano/passenger' | ||
|
||
# Load custom tasks from `lib/capistrano/tasks` if you have any defined | ||
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
set :repo_url, 'https://github.com/pulibrary/allsearch_rails_api.git' | ||
set :application, 'allsearch_rails_api' | ||
|
||
set :branch, ENV['BRANCH'] || 'main' | ||
|
||
set :deploy_to, -> { "/opt/#{fetch(:application)}" } | ||
set :repo_path, -> { "/opt/#{fetch(:application)}/repo" } | ||
|
||
set :log_level, :debug | ||
|
||
set :ssh_options, { forward_agent: true } | ||
|
||
set :passenger_restart_with_touch, true |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
set :stage, :production | ||
set :rails_env, 'production' | ||
server 'allsearch-api-prod1', user: 'deploy' |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
set :stage, :staging | ||
set :rails_env, 'staging' | ||
server 'allsearch-api-staging1', user: 'deploy' |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'active_support/core_ext/integer/time' | ||
|
||
Rails.application.configure do | ||
# Settings specified here will take precedence over those in config/application.rb. | ||
|
||
# Code is not reloaded between requests. | ||
config.cache_classes = true | ||
|
||
# Eager load code on boot. This eager loads most of Rails and | ||
# your application in memory, allowing both threaded web servers | ||
# and those relying on copy on write to perform better. | ||
# Rake tasks automatically ignore this option for performance. | ||
config.eager_load = true | ||
|
||
# Full error reports are disabled and caching is turned on. | ||
config.consider_all_requests_local = false | ||
|
||
# Disable serving static files from the `/public` folder by default since | ||
# Apache or NGINX already handles this. | ||
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? | ||
|
||
# Include generic and useful information about system operation, but avoid logging too much | ||
# information to avoid inadvertent exposure of personally identifiable information (PII). | ||
config.log_level = :info | ||
|
||
# Prepend all log lines with the following tags. | ||
config.log_tags = [:request_id] | ||
|
||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to | ||
# the I18n.default_locale when a translation cannot be found). | ||
config.i18n.fallbacks = true | ||
|
||
# Don't log any deprecations. | ||
config.active_support.report_deprecations = false | ||
|
||
# Use default logging formatter so that PID and timestamp are not suppressed. | ||
config.log_formatter = Logger::Formatter.new | ||
|
||
if ENV['RAILS_LOG_TO_STDOUT'].present? | ||
logger = ActiveSupport::Logger.new($stdout) | ||
logger.formatter = config.log_formatter | ||
config.logger = ActiveSupport::TaggedLogging.new(logger) | ||
end | ||
end |