production.rb 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. DepotClient::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. # Whether to 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. # Specifies the header that your server uses for sending files.
  35. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  36. # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  37. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  38. # config.force_ssl = true
  39. # Set to :debug to see everything in the log.
  40. config.log_level = :info
  41. # Prepend all log lines with the following tags.
  42. # config.log_tags = [ :subdomain, :uuid ]
  43. # Use a different logger for distributed setups.
  44. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
  45. # Use a different cache store in production.
  46. # config.cache_store = :mem_cache_store
  47. # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  48. # config.action_controller.asset_host = "http://assets.example.com"
  49. # Precompile additional assets.
  50. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
  51. # config.assets.precompile += %w( search.js )
  52. # Ignore bad email addresses and do not raise email delivery errors.
  53. # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  54. # config.action_mailer.raise_delivery_errors = false
  55. # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  56. # the I18n.default_locale when a translation can not be found).
  57. config.i18n.fallbacks = true
  58. # Send deprecation notices to registered listeners.
  59. config.active_support.deprecation = :notify
  60. # Log the query plan for queries taking more than this (works
  61. # with SQLite, MySQL, and PostgreSQL).
  62. # config.active_record.auto_explain_threshold_in_seconds = 0.5
  63. # Disable automatic flushing of the log to improve performance.
  64. # config.autoflush_log = false
  65. # Use default logging formatter so that PID and timestamp are not suppressed.
  66. config.log_formatter = ::Logger::Formatter.new
  67. # Default the production mode queue to an synchronous queue. You will probably
  68. # want to replace this with an out-of-process queueing solution.
  69. # config.queue = ActiveSupport::SynchronousQueue.new
  70. end