0
|
1 Rails.application.configure do
|
|
2 # Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
|
4 # Code is not reloaded between requests.
|
|
5 config.cache_classes = true
|
|
6
|
|
7 # Eager load code on boot. This eager loads most of Rails and
|
|
8 # your application in memory, allowing both threaded web servers
|
|
9 # and those relying on copy on write to perform better.
|
|
10 # Rake tasks automatically ignore this option for performance.
|
|
11 config.eager_load = true
|
|
12
|
|
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
|
185
|
17 # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
|
18 # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
|
19 # config.require_master_key = true
|
|
20
|
72
|
21 # Disable serving static files from the `/public` folder by default since
|
|
22 # Apache or NGINX already handles this.
|
185
|
23 config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
72
|
24
|
|
25 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
26 # config.action_controller.asset_host = 'http://assets.example.com'
|
0
|
27
|
|
28 # Specifies the header that your server uses for sending files.
|
72
|
29 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
|
30 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
|
31
|
0
|
32 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
33 # config.force_ssl = true
|
|
34
|
72
|
35 # Use the lowest log level to ensure availability of diagnostic information
|
|
36 # when problems arise.
|
|
37 config.log_level = :debug
|
0
|
38
|
|
39 # Prepend all log lines with the following tags.
|
185
|
40 config.log_tags = [ :request_id ]
|
0
|
41
|
|
42 # Use a different cache store in production.
|
|
43 # config.cache_store = :mem_cache_store
|
|
44
|
185
|
45 # Use a real queuing backend for Active Job (and separate queues per environment).
|
72
|
46 # config.active_job.queue_adapter = :resque
|
185
|
47 # config.active_job.queue_name_prefix = "rsstweet_production"
|
0
|
48
|
|
49 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
|
50 # the I18n.default_locale when a translation cannot be found).
|
|
51 config.i18n.fallbacks = true
|
|
52
|
|
53 # Send deprecation notices to registered listeners.
|
|
54 config.active_support.deprecation = :notify
|
|
55
|
72
|
56 # Use default logging formatter so that PID and timestamp are not suppressed.
|
|
57 config.log_formatter = ::Logger::Formatter.new
|
|
58
|
|
59 # Use a different logger for distributed setups.
|
|
60 # require 'syslog/logger'
|
|
61 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
|
62
|
185
|
63 if ENV["RAILS_LOG_TO_STDOUT"].present?
|
|
64 logger = ActiveSupport::Logger.new(STDOUT)
|
|
65 logger.formatter = config.log_formatter
|
|
66 config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
67 end
|
72
|
68
|
185
|
69 # Inserts middleware to perform automatic connection switching.
|
|
70 # The `database_selector` hash is used to pass options to the DatabaseSelector
|
|
71 # middleware. The `delay` is used to determine how long to wait after a write
|
|
72 # to send a subsequent read to the primary.
|
|
73 #
|
|
74 # The `database_resolver` class is used by the middleware to determine which
|
|
75 # database is appropriate to use based on the time delay.
|
|
76 #
|
|
77 # The `database_resolver_context` class is used by the middleware to set
|
|
78 # timestamps for the last write to the primary. The resolver uses the context
|
|
79 # class timestamps to determine how long to wait before reading from the
|
|
80 # replica.
|
|
81 #
|
|
82 # By default Rails will store a last write timestamp in the session. The
|
|
83 # DatabaseSelector middleware is designed as such you can define your own
|
|
84 # strategy for connection switching and pass that into the middleware through
|
|
85 # these configuration options.
|
|
86 # config.active_record.database_selector = { delay: 2.seconds }
|
|
87 # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
|
88 # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
0
|
89 end
|