|
10 | 10 | # Rake tasks automatically ignore this option for performance.
|
11 | 11 | config.eager_load = true
|
12 | 12 |
|
13 |
| - # Attempt to read encrypted secrets from `config/secrets.yml.enc`. |
14 |
| - # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or |
15 |
| - # `config/secrets.yml.key`. |
| 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 | + |
| 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 |
16 | 20 | config.read_encrypted_secrets = true
|
17 | 21 |
|
| 22 | + # Disable serving static files from the `/public` folder by default since |
| 23 | + # Apache or NGINX already handles this. |
| 24 | + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? |
18 | 25 |
|
| 26 | + # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
| 27 | + # config.action_controller.asset_host = 'http://assets.example.com' |
| 28 | + |
| 29 | + # Specifies the header that your server uses for sending files. |
| 30 | + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache |
| 31 | + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX |
| 32 | + |
| 33 | + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
| 34 | + # config.force_ssl = true |
19 | 35 |
|
20 | 36 | # Use the lowest log level to ensure availability of diagnostic information
|
21 | 37 | # when problems arise.
|
|
33 | 49 | # Use a different cache store in production.
|
34 | 50 | # config.cache_store = :mem_cache_store
|
35 | 51 |
|
36 |
| - # Use a real queuing backend for Active Job (and separate queues per environment) |
| 52 | + # Use a real queuing backend for Active Job (and separate queues per environment). |
37 | 53 | # config.active_job.queue_adapter = :resque
|
38 |
| - # config.active_job.queue_name_prefix = "rmt_#{Rails.env}" |
| 54 | + # config.active_job.queue_name_prefix = "rmt_production" |
39 | 55 |
|
40 | 56 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
41 | 57 | # the I18n.default_locale when a translation cannot be found).
|
|
44 | 60 | # Send deprecation notices to registered listeners.
|
45 | 61 | config.active_support.deprecation = :notify
|
46 | 62 |
|
| 63 | + # Use default logging formatter so that PID and timestamp are not suppressed. |
| 64 | + # config.log_formatter = ::Logger::Formatter.new |
| 65 | + |
| 66 | + # Use a different logger for distributed setups. |
| 67 | + # require 'syslog/logger' |
47 | 68 | config.logger = RMT::Logger.new(STDOUT)
|
48 | 69 |
|
49 | 70 | # Do not dump schema after migrations.
|
50 | 71 | config.active_record.dump_schema_after_migration = false
|
51 | 72 |
|
52 |
| - # Full error reports are disabled and caching is turned on. |
53 |
| - config.consider_all_requests_local = false |
54 |
| - config.action_controller.perform_caching = true |
55 |
| - |
56 |
| - # Disable serving static files from the `/public` folder by default since |
57 |
| - # Apache or NGINX already handles this. |
58 | 73 | config.public_file_server.enabled = true
|
59 | 74 |
|
60 |
| - # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
61 |
| - # config.action_controller.asset_host = 'http://assets.example.com' |
62 |
| - |
63 |
| - # Specifies the header that your server uses for sending files. |
64 |
| - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache |
65 |
| - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX |
66 |
| - |
67 |
| - # Mount Action Cable outside main process or domain |
68 |
| - # config.action_cable.mount_path = nil |
69 |
| - # config.action_cable.url = 'wss://example.com/cable' |
70 |
| - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] |
71 |
| - |
72 |
| - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
73 |
| - # config.force_ssl = true |
74 |
| - |
75 |
| - # config.action_mailer.perform_caching = false |
76 |
| - |
77 |
| - # Ignore bad email addresses and do not raise email delivery errors. |
78 |
| - # Set this to true and configure the email server for immediate delivery to raise delivery errors. |
79 |
| - # config.action_mailer.raise_delivery_errors = false |
| 75 | + # Inserts middleware to perform automatic connection switching. |
| 76 | + # The `database_selector` hash is used to pass options to the DatabaseSelector |
| 77 | + # middleware. The `delay` is used to determine how long to wait after a write |
| 78 | + # to send a subsequent read to the primary. |
| 79 | + # |
| 80 | + # The `database_resolver` class is used by the middleware to determine which |
| 81 | + # database is appropriate to use based on the time delay. |
| 82 | + # |
| 83 | + # The `database_resolver_context` class is used by the middleware to set |
| 84 | + # timestamps for the last write to the primary. The resolver uses the context |
| 85 | + # class timestamps to determine how long to wait before reading from the |
| 86 | + # replica. |
| 87 | + # |
| 88 | + # By default Rails will store a last write timestamp in the session. The |
| 89 | + # DatabaseSelector middleware is designed as such you can define your own |
| 90 | + # strategy for connection switching and pass that into the middleware through |
| 91 | + # these configuration options. |
| 92 | + # config.active_record.database_selector = { delay: 2.seconds } |
| 93 | + # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver |
| 94 | + # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session |
80 | 95 | end
|
0 commit comments