Correções para funcionamento do Docker
This commit is contained in:
27
config/environments/production.rb
Normal file
27
config/environments/production.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
require "active_support/core_ext/integer/time"
|
||||
|
||||
Rails.application.configure do
|
||||
config.enable_reloading = false
|
||||
config.eager_load = true
|
||||
config.consider_all_requests_local = false
|
||||
|
||||
config.force_ssl = false # mude para true quando tiver HTTPS
|
||||
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
||||
config.log_tags = [:request_id]
|
||||
config.logger = ActiveSupport::Logger.new(STDOUT).tap { |l| l.formatter = ::Logger::Formatter.new }
|
||||
.then { |l| ActiveSupport::TaggedLogging.new(l) }
|
||||
|
||||
config.cache_store = :memory_store
|
||||
config.active_storage.service = :local if defined?(ActiveStorage)
|
||||
|
||||
config.action_mailer.perform_caching = false
|
||||
config.action_mailer.default_url_options = { host: ENV.fetch("APP_HOST", "localhost:3000") }
|
||||
|
||||
config.i18n.fallbacks = true
|
||||
config.active_support.report_deprecations = false
|
||||
config.active_record.dump_schema_after_migration = false
|
||||
|
||||
# Aceita o host configurado no .env
|
||||
config.hosts << ENV["APP_HOST"]&.split(":")&.first if ENV["APP_HOST"].present?
|
||||
config.hosts.clear if ENV["RAILS_ALLOW_ALL_HOSTS"] == "true"
|
||||
end
|
||||
Reference in New Issue
Block a user