production.rb 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. require "active_support/core_ext/integer/time"
  2. Rails.application.configure do
  3. # Settings specified here will take precedence over those in config/application.rb.
  4. # Code is not reloaded between requests.
  5. config.enable_reloading = false
  6. # Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
  7. config.eager_load = true
  8. # Full error reports are disabled.
  9. config.consider_all_requests_local = false
  10. # Turn on fragment caching in view templates.
  11. config.action_controller.perform_caching = true
  12. # Cache assets for far-future expiry since they are all digest stamped.
  13. config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
  14. # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  15. # config.asset_host = "http://assets.example.com"
  16. # Store uploaded files on the local file system (see config/storage.yml for options).
  17. config.active_storage.service = :local
  18. # Assume all access to the app is happening through a SSL-terminating reverse proxy.
  19. config.assume_ssl = true
  20. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  21. config.force_ssl = true
  22. # Skip http-to-https redirect for the default health check endpoint.
  23. # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
  24. # Log to STDOUT with the current request id as a default log tag.
  25. config.log_tags = [ :request_id ]
  26. config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
  27. # Change to "debug" to log everything (including potentially personally-identifiable information!)
  28. config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
  29. # Prevent health checks from clogging up the logs.
  30. config.silence_healthcheck_path = "/up"
  31. # Don't log any deprecations.
  32. config.active_support.report_deprecations = false
  33. # Replace the default in-process memory cache store with a durable alternative.
  34. config.cache_store = :solid_cache_store
  35. # Replace the default in-process and non-durable queuing backend for Active Job.
  36. config.active_job.queue_adapter = :solid_queue
  37. config.solid_queue.connects_to = { database: { writing: :queue } }
  38. # Ignore bad email addresses and do not raise email delivery errors.
  39. # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  40. # config.action_mailer.raise_delivery_errors = false
  41. # Set host to be used by links generated in mailer templates.
  42. config.action_mailer.default_url_options = { host: "example.com" }
  43. # Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
  44. # config.action_mailer.smtp_settings = {
  45. # user_name: Rails.application.credentials.dig(:smtp, :user_name),
  46. # password: Rails.application.credentials.dig(:smtp, :password),
  47. # address: "smtp.example.com",
  48. # port: 587,
  49. # authentication: :plain
  50. # }
  51. # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  52. # the I18n.default_locale when a translation cannot be found).
  53. config.i18n.fallbacks = true
  54. # Do not dump schema after migrations.
  55. config.active_record.dump_schema_after_migration = false
  56. # Only use :id for inspections in production.
  57. config.active_record.attributes_for_inspect = [ :id ]
  58. # Enable DNS rebinding protection and other `Host` header attacks.
  59. # config.hosts = [
  60. # "example.com", # Allow requests from example.com
  61. # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
  62. # ]
  63. #
  64. # Skip DNS rebinding protection for the default health check endpoint.
  65. # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
  66. end