annotate config/environments/production.rb @ 49:929218b3b2e2

Ignore local config files.
author nanaya <me@myconan.net>
date Thu, 23 Apr 2015 16:23:36 +0900
parents efc548be0a3a
children 3f419d621b06
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
1 Rails.application.configure do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
2 # Settings specified here will take precedence over those in config/application.rb.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
3
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
4 # Code is not reloaded between requests.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 config.cache_classes = true
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
6
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
7 # Eager load code on boot. This eager loads most of Rails and
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 # your application in memory, allowing both threaded web servers
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
9 # and those relying on copy on write to perform better.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
10 # Rake tasks automatically ignore this option for performance.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
11 config.eager_load = true
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
12
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
13 # Full error reports are disabled and caching is turned on.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 config.consider_all_requests_local = false
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
15 config.action_controller.perform_caching = true
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
16
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
17 # Enable Rack::Cache to put a simple HTTP cache in front of your application
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
18 # Add `rack-cache` to your Gemfile before enabling this.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
19 # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
20 # config.action_dispatch.rack_cache = true
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
21
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
22 # Disable Rails's static asset server (Apache or nginx will already do this).
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
23 config.serve_static_assets = false
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
24
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
25 # Specifies the header that your server uses for sending files.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
26 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
27 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
28
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
29 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
30 # config.force_ssl = true
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
31
27
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
32 # Use default logging formatter so that PID and timestamp are not suppressed.
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
33 config.log_formatter = ::Logger::Formatter.new
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
34
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
35 # Set to :debug to see everything in the log.
27
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
36 config.log_level = :warn
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
37 config.logger = ::Logger.new(STDOUT)
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
38
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
39 # Recommended by http://help.papertrailapp.com/kb/configuration/unicorn
efc548be0a3a Fix logging to stdout in production.
edogawaconan <me@myconan.net>
parents: 20
diff changeset
40 config.logger.level = Logger.const_get("WARN")
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
41
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
42 # Prepend all log lines with the following tags.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
43 # config.log_tags = [ :subdomain, :uuid ]
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
44
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
45 # Use a different logger for distributed setups.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
46 # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
47
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
48 # Use a different cache store in production.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
49 # config.cache_store = :mem_cache_store
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
50
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
51 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
52 # config.action_controller.asset_host = "http://assets.example.com"
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
53
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
54 # Ignore bad email addresses and do not raise email delivery errors.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
55 # Set this to true and configure the email server for immediate delivery to raise delivery errors.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
56 # config.action_mailer.raise_delivery_errors = false
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
57
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
58 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
59 # the I18n.default_locale when a translation cannot be found).
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
60 config.i18n.fallbacks = true
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
61
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
62 # Send deprecation notices to registered listeners.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
63 config.active_support.deprecation = :notify
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
64
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
65 # Disable automatic flushing of the log to improve performance.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
66 # config.autoflush_log = false
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
67 end