Mercurial > zeropaste
annotate config/environments/production.rb @ 390:91dabc034389
Improved styling for show.
author | nanaya <me@myconan.net> |
---|---|
date | Sun, 07 Jun 2015 19:38:42 +0900 |
parents | 9e860754b5d6 |
children | 68eb23b52864 |
rev | line source |
---|---|
0 | 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 | 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 | 5 config.cache_classes = true |
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 | 14 config.consider_all_requests_local = false |
15 config.action_controller.perform_caching = true | |
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). |
363
9e860754b5d6
Update renamed config, enforce random test order.
edogawaconan <me@myconan.net>
parents:
336
diff
changeset
|
23 config.serve_static_files = false |
0 | 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 | 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 | 30 config.assets.compile = false |
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 | 33 config.assets.digest = true |
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. |
336 | 36 config.assets.version = "1.0" |
0 | 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 | 39 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache |
40 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx | |
41 | |
42 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | |
43 # config.force_ssl = true | |
44 | |
248
9d6f13168d25
Output log to stdout which will be captured by rack logger.
edogawaconan <me@myconan.net>
parents:
202
diff
changeset
|
45 # # Default logging formatter to keep PID and timestamp |
9d6f13168d25
Output log to stdout which will be captured by rack logger.
edogawaconan <me@myconan.net>
parents:
202
diff
changeset
|
46 config.log_formatter = Logger::Formatter.new |
9d6f13168d25
Output log to stdout which will be captured by rack logger.
edogawaconan <me@myconan.net>
parents:
202
diff
changeset
|
47 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
48 # Set to :debug to see everything in the log. |
248
9d6f13168d25
Output log to stdout which will be captured by rack logger.
edogawaconan <me@myconan.net>
parents:
202
diff
changeset
|
49 config.log_level = :warn |
9d6f13168d25
Output log to stdout which will be captured by rack logger.
edogawaconan <me@myconan.net>
parents:
202
diff
changeset
|
50 config.logger = Logger.new(STDOUT) |
9d6f13168d25
Output log to stdout which will be captured by rack logger.
edogawaconan <me@myconan.net>
parents:
202
diff
changeset
|
51 |
9d6f13168d25
Output log to stdout which will be captured by rack logger.
edogawaconan <me@myconan.net>
parents:
202
diff
changeset
|
52 # Recommended by http://help.papertrailapp.com/kb/configuration/unicorn |
336 | 53 config.logger.level = Logger.const_get("WARN") |
0 | 54 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
55 # Prepend all log lines with the following tags. |
0 | 56 # config.log_tags = [ :subdomain, :uuid ] |
57 | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
58 # Use a different logger for distributed setups. |
0 | 59 # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) |
60 | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
61 # Use a different cache store in production. |
252
49410cc6ffd6
Whoops, doesn't work with multi-process setup.
edogawaconan <me@myconan.net>
parents:
250
diff
changeset
|
62 # config.cache_store = :memory_store |
0 | 63 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
64 # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
0 | 65 # config.action_controller.asset_host = "http://assets.example.com" |
66 | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
67 # Precompile additional assets. |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
68 # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. |
0 | 69 # config.assets.precompile += %w( search.js ) |
70 | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
71 # 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
|
72 # Set this to true and configure the email server for immediate delivery to raise delivery errors. |
0 | 73 # config.action_mailer.raise_delivery_errors = false |
74 | |
75 # 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
|
76 # the I18n.default_locale when a translation can not be found). |
0 | 77 config.i18n.fallbacks = true |
78 | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
79 # Send deprecation notices to registered listeners. |
0 | 80 config.active_support.deprecation = :notify |
198
f513b1ca455a
Add the new eager_load config parameter.
Edho Arief <edho@myconan.net>
parents:
195
diff
changeset
|
81 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
82 # 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
|
83 # config.autoflush_log = false |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
84 |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
198
diff
changeset
|
85 # 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
|
86 config.log_formatter = ::Logger::Formatter.new |
0 | 87 end |