comparison config/environments/production.rb @ 467:fd3078b4d355

Update to latest rails
author nanaya <me@nanaya.pro>
date Tue, 22 Oct 2019 16:17:30 +0900
parents d31fe32da7a0
children 88fd5722fcb3
comparison
equal deleted inserted replaced
466:722f4eccd370 467:fd3078b4d355
12 12
13 # Full error reports are disabled and caching is turned on. 13 # Full error reports are disabled and caching is turned on.
14 config.consider_all_requests_local = false 14 config.consider_all_requests_local = false
15 config.action_controller.perform_caching = true 15 config.action_controller.perform_caching = true
16 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
20
17 # Disable serving static files from the `/public` folder by default since 21 # Disable serving static files from the `/public` folder by default since
18 # Apache or NGINX already handles this. 22 # Apache or NGINX already handles this.
19 config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? 23 config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
20 24
21 # Compress JavaScripts and CSS. 25 # Compress CSS using a preprocessor.
22 config.assets.js_compressor = :uglifier
23 # config.assets.css_compressor = :sass 26 # config.assets.css_compressor = :sass
24 27
25 # Do not fallback to assets pipeline if a precompiled asset is missed. 28 # Do not fallback to assets pipeline if a precompiled asset is missed.
26 config.assets.compile = false 29 config.assets.compile = false
27
28 # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
29 30
30 # Enable serving of images, stylesheets, and JavaScripts from an asset server. 31 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
31 # config.action_controller.asset_host = 'http://assets.example.com' 32 # config.action_controller.asset_host = 'http://assets.example.com'
32 33
33 # Specifies the header that your server uses for sending files. 34 # Specifies the header that your server uses for sending files.
34 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 35 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
35 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 36 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
36
37 # Action Cable endpoint configuration
38 # config.action_cable.url = 'wss://example.com/cable'
39 # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
40
41 # Don't mount Action Cable in the main server process.
42 # config.action_cable.mount_path = nil
43 37
44 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 38 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45 # config.force_ssl = true 39 # config.force_ssl = true
46 40
47 # Use the lowest log level to ensure availability of diagnostic information 41 # Use the lowest log level to ensure availability of diagnostic information
48 # when problems arise. 42 # when problems arise.
49 config.log_level = :debug 43 config.log_level = :debug
50 44
51 # Prepend all log lines with the following tags. 45 # Prepend all log lines with the following tags.
52 config.log_tags = [:request_id] 46 config.log_tags = [ :request_id ]
53 47
54 # Use a different cache store in production. 48 # Use a different cache store in production.
55 # config.cache_store = :mem_cache_store 49 # config.cache_store = :mem_cache_store
56 50
57 # Use a real queuing backend for Active Job (and separate queues per environment) 51 # Use a real queuing backend for Active Job (and separate queues per environment).
58 # config.active_job.queue_adapter = :resque 52 # config.active_job.queue_adapter = :resque
59 # config.active_job.queue_name_prefix = "zeropaste_#{Rails.env}" 53 # config.active_job.queue_name_prefix = "zeropaste_production"
60 # config.action_mailer.perform_caching = false
61
62 # Ignore bad email addresses and do not raise email delivery errors.
63 # Set this to true and configure the email server for immediate delivery to raise delivery errors.
64 # config.action_mailer.raise_delivery_errors = false
65 54
66 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 55 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
67 # the I18n.default_locale when a translation cannot be found). 56 # the I18n.default_locale when a translation cannot be found).
68 config.i18n.fallbacks = true 57 config.i18n.fallbacks = true
69 58
76 # Use a different logger for distributed setups. 65 # Use a different logger for distributed setups.
77 # require 'syslog/logger' 66 # require 'syslog/logger'
78 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') 67 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
79 68
80 if $cfg[:log_to_stdout] 69 if $cfg[:log_to_stdout]
81 logger = ActiveSupport::Logger.new(STDOUT) 70 logger = ActiveSupport::Logger.new(STDOUT)
82 logger.formatter = config.log_formatter 71 logger.formatter = config.log_formatter
83 config.logger = ActiveSupport::TaggedLogging.new(logger) 72 config.logger = ActiveSupport::TaggedLogging.new(logger)
84 end 73 end
85 74
86 # Do not dump schema after migrations. 75 # Do not dump schema after migrations.
87 config.active_record.dump_schema_after_migration = false 76 config.active_record.dump_schema_after_migration = false
77
78 # Inserts middleware to perform automatic connection switching.
79 # The `database_selector` hash is used to pass options to the DatabaseSelector
80 # middleware. The `delay` is used to determine how long to wait after a write
81 # to send a subsequent read to the primary.
82 #
83 # The `database_resolver` class is used by the middleware to determine which
84 # database is appropriate to use based on the time delay.
85 #
86 # The `database_resolver_context` class is used by the middleware to set
87 # timestamps for the last write to the primary. The resolver uses the context
88 # class timestamps to determine how long to wait before reading from the
89 # replica.
90 #
91 # By default Rails will store a last write timestamp in the session. The
92 # DatabaseSelector middleware is designed as such you can define your own
93 # strategy for connection switching and pass that into the middleware through
94 # these configuration options.
95 # config.active_record.database_selector = { delay: 2.seconds }
96 # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
97 # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
88 end 98 end