Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ gem "coffee-script"
gem "activeadmin"
# gem 'inherited_resources', github: 'activeadmin/inherited_resources'

# Heroku logging
gem "rails_12factor", group: [:staging, :production]

# Email validation
gem "email_validator"

Expand Down
6 changes: 0 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (6.0.2.1)
actionpack (= 6.0.2.1)
activesupport (= 6.0.2.1)
Expand Down Expand Up @@ -355,7 +350,6 @@ DEPENDENCIES
puma (~> 3.12)
rack-timeout
rails (~> 6.0.2.1)
rails_12factor
rubocop
ruby_audit
sass-rails (>= 5.0.3)
Expand Down
21 changes: 13 additions & 8 deletions config/database.yml.postgresql
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
<% branch_name = `git symbolic-ref HEAD 2>/dev/null`.chomp.sub('refs/heads/', '') %>
<% repository_name = `git rev-parse --show-toplevel`.split('/').last.strip %>

development:
default: &default
adapter: postgresql
encoding: unicode
database: <%= repository_name %>_development
pool: 5
host: localhost
username: postgres
password:
pool: 5


development:
<<: *default
database: <%= repository_name %>_development

staging:
<<: *default
database: <%= "#{repository_name}_staging" %>

test:
adapter: postgresql
encoding: unicode
<<: *default
database: <%= repository_name %>_test
pool: 5
username: postgres
password:
14 changes: 9 additions & 5 deletions config/database.yml.postgresqlapp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
# If you prefer to have branch name in the database name then use following
# database: <%= "#{repository_name}_development_#{branch_name}"[0...63] %>

development:
default: &default
adapter: postgresql
database: <%= "#{repository_name}_development"[0...63] %>
encoding: unicode
host: localhost
username: postgres
password:
pool: 5

development:
<<: *default
database: <%= "#{repository_name}_development"[0...63] %>

test:
adapter: postgresql
<<: *default
database: <%= "#{repository_name}_test"[0...63] %>
host: localhost
pool: 5
8 changes: 8 additions & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Load the Rails application.
require_relative 'application'

Rails.application.configure do
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

# Initialize the Rails application.
Rails.application.initialize!
9 changes: 1 addition & 8 deletions config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
# Generate digests for assets URLs.
config.assets.digest = true

# Version of your assets, change this if you want to expire all your assets.
config.assets.version = "1.0"

# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
Expand All @@ -48,7 +45,7 @@
config.log_level = :debug

# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
config.log_tags = [ :request_id ]

# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
Expand All @@ -59,10 +56,6 @@
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )

# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
Expand Down
5 changes: 0 additions & 5 deletions config/initializers/tagged_logging.rb

This file was deleted.

14 changes: 14 additions & 0 deletions config/sidekiq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
default: &default
:concurrency: 5

development:
<<: *default

staging:
<<: *default

production:
<<: *default

queues:
- default