production.rb 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. Rails.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 threaded 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. # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
  35. # Specifies the header that your server uses for sending files.
  36. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  37. # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  38. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  39. # config.force_ssl = true
  40. # Set to :debug to see everything in the log.
  41. config.log_level = :info
  42. # Prepend all log lines with the following tags.
  43. # config.log_tags = [ :subdomain, :uuid ]
  44. # Use a different logger for distributed setups.
  45. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
  46. # Use a different cache store in production.
  47. # config.cache_store = :mem_cache_store
  48. # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  49. # config.action_controller.asset_host = "http://assets.example.com"
  50. # Ignore bad email addresses and do not raise email delivery errors.
  51. # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  52. # config.action_mailer.raise_delivery_errors = false
  53. # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  54. # the I18n.default_locale when a translation cannot be found).
  55. config.i18n.fallbacks = true
  56. # Send deprecation notices to registered listeners.
  57. config.active_support.deprecation = :notify
  58. # Disable automatic flushing of the log to improve performance.
  59. # config.autoflush_log = false
  60. # Use default logging formatter so that PID and timestamp are not suppressed.
  61. config.log_formatter = ::Logger::Formatter.new
  62. # Do not dump schema after migrations.
  63. config.active_record.dump_schema_after_migration = false
  64. end