production.rb 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #---
  2. # Excerpted from "Agile Web Development with Rails",
  3. # published by The Pragmatic Bookshelf.
  4. # Copyrights apply to this code. It may not be used to create training material,
  5. # courses, books, articles, and the like. Contact us if you are in doubt.
  6. # We make no guarantees that this code is fit for any purpose.
  7. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  8. #---
  9. Depot::Application.configure do
  10. # Settings specified here will take precedence over those in config/application.rb
  11. # Code is not reloaded between requests
  12. config.cache_classes = true
  13. # Full error reports are disabled and caching is turned on
  14. config.consider_all_requests_local = false
  15. config.action_controller.perform_caching = true
  16. # Disable Rails's static asset server (Apache or nginx will already do this)
  17. config.serve_static_assets = false
  18. # Compress JavaScripts and CSS
  19. config.assets.compress = true
  20. # Don't fallback to assets pipeline if a precompiled asset is missed
  21. config.assets.compile = false
  22. # Generate digests for assets URLs
  23. config.assets.digest = true
  24. # Defaults to nil and saved in location specified by config.assets.prefix
  25. # config.assets.manifest = YOUR_PATH
  26. # Specifies the header that your server uses for sending files
  27. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  28. # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  29. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  30. # config.force_ssl = true
  31. # See everything in the log (default is :info)
  32. # config.log_level = :debug
  33. # Prepend all log lines with the following tags
  34. # config.log_tags = [ :subdomain, :uuid ]
  35. # Use a different logger for distributed setups
  36. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
  37. # Use a different cache store in production
  38. # config.cache_store = :mem_cache_store
  39. # Enable serving of images, stylesheets, and JavaScripts from an asset server
  40. # config.action_controller.asset_host = "http://assets.example.com"
  41. # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
  42. # config.assets.precompile += %w( search.js )
  43. # Disable delivery errors, bad email addresses will be ignored
  44. # config.action_mailer.raise_delivery_errors = false
  45. # Enable threaded mode
  46. # config.threadsafe!
  47. # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  48. # the I18n.default_locale when a translation can not be found)
  49. config.i18n.fallbacks = true
  50. # Send deprecation notices to registered listeners
  51. config.active_support.deprecation = :notify
  52. # Log the query plan for queries taking more than this (works
  53. # with SQLite, MySQL, and PostgreSQL)
  54. # config.active_record.auto_explain_threshold_in_seconds = 0.5
  55. end