production.rb 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. # Eager load code on boot. This eager loads most of Rails and
  14. # your application in memory, allowing both thread web servers
  15. # and those relying on copy on write to perform better.
  16. # Rake tasks automatically ignore this option for performance.
  17. config.eager_load = true
  18. # Full error reports are disabled and caching is turned on.
  19. config.consider_all_requests_local = false
  20. config.action_controller.perform_caching = true
  21. # Enable Rack::Cache to put a simple HTTP cache in front of your application
  22. # Add `rack-cache` to your Gemfile before enabling this.
  23. # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
  24. # config.action_dispatch.rack_cache = true
  25. # Disable Rails's static asset server (Apache or nginx will already do this).
  26. config.serve_static_assets = false
  27. # Compress JavaScripts and CSS.
  28. config.assets.js_compressor = :uglifier
  29. # config.assets.css_compressor = :sass
  30. # Do not fallback to assets pipeline if a precompiled asset is missed.
  31. config.assets.compile = false
  32. # Generate digests for assets URLs.
  33. config.assets.digest = true
  34. # Version of your assets, change this if you want to expire all your assets.
  35. config.assets.version = '1.0'
  36. # Specifies the header that your server uses for sending files.
  37. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  38. # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  39. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  40. # config.force_ssl = true
  41. # Set to :debug to see everything in the log.
  42. config.log_level = :info
  43. # Prepend all log lines with the following tags.
  44. # config.log_tags = [ :subdomain, :uuid ]
  45. # Use a different logger for distributed setups.
  46. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
  47. # Use a different cache store in production.
  48. # config.cache_store = :mem_cache_store
  49. # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  50. # config.action_controller.asset_host = "http://assets.example.com"
  51. # Precompile additional assets.
  52. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
  53. # config.assets.precompile += %w( search.js )
  54. # Ignore bad email addresses and do not raise email delivery errors.
  55. # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  56. # config.action_mailer.raise_delivery_errors = false
  57. # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  58. # the I18n.default_locale when a translation can not be found).
  59. config.i18n.fallbacks = true
  60. # Send deprecation notices to registered listeners.
  61. config.active_support.deprecation = :notify
  62. # Disable automatic flushing of the log to improve performance.
  63. # config.autoflush_log = false
  64. # Use default logging formatter so that PID and timestamp are not suppressed.
  65. config.log_formatter = ::Logger::Formatter.new
  66. end