Skip to content

Commit

Permalink
fix: LAGO_USE_AWS_S3 env var usage (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdenquin authored Aug 23, 2022
1 parent 2798352 commit 08ed0e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
config.consider_all_requests_local = false
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

config.active_storage.service = if ENV['LAGO_USE_AWS_S3'].present?
if ENV['LAGO_AWS_S3_ENDPOINT'].present?
config.active_storage.service = if ENV['LAGO_USE_AWS_S3'].present? && ENV['LAGO_USE_AWS_S3'] == 'true'
if ENV['LAGO_AWS_S3_ENDPOINT'].present? && !ENV['LAGO_AWS_S3_ENDPOINT'].empty?
:amazon_compatible_endpoint
else
:amazon
Expand All @@ -25,7 +25,7 @@
config.active_support.report_deprecations = false
config.log_formatter = ::Logger::Formatter.new

if ENV['RAILS_LOG_TO_STDOUT'].present?
if ENV['RAILS_LOG_TO_STDOUT'].present? && ENV['RAILS_LOG_TO_STDOUT'] == 'true'
logger = ActiveSupport::Logger.new($stdout)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
Expand Down

0 comments on commit 08ed0e9

Please sign in to comment.