production.rb 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Rails.application.configure do
  2. # Settings specified here will take precedence over those in config/application.rb.
  3. # Code is not reloaded between requests.
  4. config.cache_classes = true
  5. # Eager load code on boot. This eager loads most of Rails and
  6. # your application in memory, allowing both threaded web servers
  7. # and those relying on copy on write to perform better.
  8. # Rake tasks automatically ignore this option for performance.
  9. config.eager_load = true
  10. # Full error reports are disabled and caching is turned on.
  11. config.consider_all_requests_local = false
  12. config.action_controller.perform_caching = true
  13. # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
  14. # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
  15. # config.require_master_key = true
  16. # Disable serving static files from the `/public` folder by default since
  17. # Apache or NGINX already handles this.
  18. config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
  19. # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  20. # config.action_controller.asset_host = 'http://assets.example.com'
  21. # Specifies the header that your server uses for sending files.
  22. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
  23. # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
  24. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  25. # config.force_ssl = true
  26. # Use the lowest log level to ensure availability of diagnostic information
  27. # when problems arise.
  28. config.log_level = :error
  29. # Prepend all log lines with the following tags.
  30. config.log_tags = [ :request_id ]
  31. # Use a different cache store in production.
  32. # config.cache_store = :mem_cache_store
  33. # Use a real queuing backend for Active Job (and separate queues per environment)
  34. # config.active_job.queue_adapter = :resque
  35. # config.active_job.queue_name_prefix = "testrails522_#{Rails.env}"
  36. # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  37. # the I18n.default_locale when a translation cannot be found).
  38. config.i18n.fallbacks = true
  39. # Send deprecation notices to registered listeners.
  40. config.active_support.deprecation = :notify
  41. # Use default logging formatter so that PID and timestamp are not suppressed.
  42. config.log_formatter = ::Logger::Formatter.new
  43. # Use a different logger for distributed setups.
  44. # require 'syslog/logger'
  45. # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
  46. if ENV["RAILS_LOG_TO_STDOUT"].present?
  47. logger = ActiveSupport::Logger.new(STDOUT)
  48. logger.formatter = config.log_formatter
  49. config.logger = ActiveSupport::TaggedLogging.new(logger)
  50. end
  51. # Do not dump schema after migrations.
  52. config.active_record.dump_schema_after_migration = false
  53. end