comparison config/environments/production.rb @ 72:257910c60eb3

Rails 5 \o/
author nanaya <me@myconan.net>
date Fri, 13 May 2016 04:32:21 +0900
parents 3f419d621b06
children d5a0d66ee457
comparison
equal deleted inserted replaced
71:e4cc80d72926 72:257910c60eb3
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 # Enable Rack::Cache to put a simple HTTP cache in front of your application 17 # Disable serving static files from the `/public` folder by default since
18 # Add `rack-cache` to your Gemfile before enabling this. 18 # Apache or NGINX already handles this.
19 # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 19 config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
20 # config.action_dispatch.rack_cache = true
21 20
22 # Disable Rails's static asset server (Apache or nginx will already do this). 21 # Compress JavaScripts and CSS.
23 config.serve_static_files = false 22 # config.assets.js_compressor = :uglifier
23 # config.assets.css_compressor = :sass
24
25 # Do not fallback to assets pipeline if a precompiled asset is missed.
26 # config.assets.compile = false
27
28 # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
29
30 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
31 # config.action_controller.asset_host = 'http://assets.example.com'
24 32
25 # Specifies the header that your server uses for sending files. 33 # Specifies the header that your server uses for sending files.
26 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache 34 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
27 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 35 # 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
28 43
29 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 44 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
30 # config.force_ssl = true 45 # config.force_ssl = true
31 46
32 # Use default logging formatter so that PID and timestamp are not suppressed. 47 # Use the lowest log level to ensure availability of diagnostic information
33 config.log_formatter = ::Logger::Formatter.new 48 # when problems arise.
34 49 config.log_level = :debug
35 # Set to :debug to see everything in the log.
36 config.log_level = :warn
37 config.logger = ::Logger.new(STDOUT)
38
39 # Recommended by http://help.papertrailapp.com/kb/configuration/unicorn
40 config.logger.level = Logger.const_get("WARN")
41 50
42 # Prepend all log lines with the following tags. 51 # Prepend all log lines with the following tags.
43 # config.log_tags = [ :subdomain, :uuid ] 52 config.log_tags = [:request_id]
44
45 # Use a different logger for distributed setups.
46 # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
47 53
48 # Use a different cache store in production. 54 # Use a different cache store in production.
49 # config.cache_store = :mem_cache_store 55 # config.cache_store = :mem_cache_store
50 56
51 # Enable serving of images, stylesheets, and JavaScripts from an asset server. 57 # Use a real queuing backend for Active Job (and separate queues per environment)
52 # config.action_controller.asset_host = "http://assets.example.com" 58 # config.active_job.queue_adapter = :resque
59 # config.active_job.queue_name_prefix = "rsstweet_#{Rails.env}"
60 # config.action_mailer.perform_caching = false
53 61
54 # Ignore bad email addresses and do not raise email delivery errors. 62 # Ignore bad email addresses and do not raise email delivery errors.
55 # Set this to true and configure the email server for immediate delivery to raise delivery errors. 63 # Set this to true and configure the email server for immediate delivery to raise delivery errors.
56 # config.action_mailer.raise_delivery_errors = false 64 # config.action_mailer.raise_delivery_errors = false
57 65
60 config.i18n.fallbacks = true 68 config.i18n.fallbacks = true
61 69
62 # Send deprecation notices to registered listeners. 70 # Send deprecation notices to registered listeners.
63 config.active_support.deprecation = :notify 71 config.active_support.deprecation = :notify
64 72
65 # Disable automatic flushing of the log to improve performance. 73 # Use default logging formatter so that PID and timestamp are not suppressed.
66 # config.autoflush_log = false 74 config.log_formatter = ::Logger::Formatter.new
75
76 # Use a different logger for distributed setups.
77 # require 'syslog/logger'
78 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
79
80 # if ENV["RAILS_LOG_TO_STDOUT"].present?
81 logger = ActiveSupport::Logger.new(STDOUT)
82 logger.formatter = config.log_formatter
83 config.logger = ActiveSupport::TaggedLogging.new(logger)
84 # end
85
86 # Do not dump schema after migrations.
87 # config.active_record.dump_schema_after_migration = false
67 end 88 end