production.rb 2.9 KB

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