annotate config/environments/production.rb @ 220:183e8560a337

Update prettify to 2013/03/04.
author Edho Arief <edho@myconan.net>
date Sun, 12 May 2013 12:05:08 +0900
parents d4cf49db9c49
children 9d6f13168d25
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
1 Zeropaste::Application.configure do
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
2 # Settings specified here will take precedence over those in config/application.rb.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
3
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
4 # Code is not reloaded between requests.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
5 config.cache_classes = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
6
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
7 # Eager load code on boot. This eager loads most of Rails and
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
8 # your application in memory, allowing both thread web servers
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
9 # and those relying on copy on write to perform better.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
10 # Rake tasks automatically ignore this option for performance.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
11 config.eager_load = true
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
12
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
13 # Full error reports are disabled and caching is turned on.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
14 config.consider_all_requests_local = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
15 config.action_controller.perform_caching = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
16
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
17 # Enable Rack::Cache to put a simple HTTP cache in front of your application
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
18 # Add `rack-cache` to your Gemfile before enabling this.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
19 # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
20 # config.action_dispatch.rack_cache = true
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
21
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
22 # Disable Rails's static asset server (Apache or nginx will already do this).
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
23 config.serve_static_assets = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
24
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
25 # Compress JavaScripts and CSS.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
26 config.assets.js_compressor = :uglifier
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
27 # config.assets.css_compressor = :sass
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
28
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
29 # Do not fallback to assets pipeline if a precompiled asset is missed.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
30 config.assets.compile = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
31
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
32 # Generate digests for assets URLs.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
33 config.assets.digest = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
34
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
35 # Version of your assets, change this if you want to expire all your assets.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
36 config.assets.version = '1.0'
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
37
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
38 # Specifies the header that your server uses for sending files.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
39 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
40 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
41
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
42 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
43 # config.force_ssl = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
44
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
45 # Set to :debug to see everything in the log.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
46 config.log_level = :info
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
47
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
48 # Prepend all log lines with the following tags.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
49 # config.log_tags = [ :subdomain, :uuid ]
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
50
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
51 # Use a different logger for distributed setups.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
52 # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
53
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
54 # Use a different cache store in production.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
55 # config.cache_store = :mem_cache_store
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
56
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
57 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
58 # config.action_controller.asset_host = "http://assets.example.com"
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
59
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
60 # Precompile additional assets.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
61 # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
62 # config.assets.precompile += %w( search.js )
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
63
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
64 # Ignore bad email addresses and do not raise email delivery errors.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
65 # Set this to true and configure the email server for immediate delivery to raise delivery errors.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
66 # config.action_mailer.raise_delivery_errors = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
67
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
68 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
69 # the I18n.default_locale when a translation can not be found).
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
70 config.i18n.fallbacks = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
71
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
72 # Send deprecation notices to registered listeners.
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
73 config.active_support.deprecation = :notify
198
f513b1ca455a Add the new eager_load config parameter.
Edho Arief <edho@myconan.net>
parents: 195
diff changeset
74
202
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
75 # Disable automatic flushing of the log to improve performance.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
76 # config.autoflush_log = false
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
77
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
78 # Use default logging formatter so that PID and timestamp are not suppressed.
d4cf49db9c49 ...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents: 198
diff changeset
79 config.log_formatter = ::Logger::Formatter.new
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
80 end