質問編集履歴
1
config/environments/production.rbの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -273,3 +273,201 @@
|
|
273
273
|
|
274
274
|
|
275
275
|
お詳しい方ご教授お願い致します。
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
以下追記
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
config/environments/production.rb
|
284
|
+
|
285
|
+
```ruby
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
Rails.application.configure do
|
290
|
+
|
291
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
# Code is not reloaded between requests.
|
296
|
+
|
297
|
+
config.cache_classes = true
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
# Eager load code on boot. This eager loads most of Rails and
|
302
|
+
|
303
|
+
# your application in memory, allowing both threaded web servers
|
304
|
+
|
305
|
+
# and those relying on copy on write to perform better.
|
306
|
+
|
307
|
+
# Rake tasks automatically ignore this option for performance.
|
308
|
+
|
309
|
+
config.eager_load = true
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
# Full error reports are disabled and caching is turned on.
|
314
|
+
|
315
|
+
config.consider_all_requests_local = false
|
316
|
+
|
317
|
+
config.action_controller.perform_caching = true
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
|
322
|
+
|
323
|
+
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
|
324
|
+
|
325
|
+
# `config/secrets.yml.key`.
|
326
|
+
|
327
|
+
config.read_encrypted_secrets = true
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
# Disable serving static files from the `/public` folder by default since
|
332
|
+
|
333
|
+
# Apache or NGINX already handles this.
|
334
|
+
|
335
|
+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
# Compress JavaScripts and CSS.
|
340
|
+
|
341
|
+
config.assets.js_compressor = :uglifier
|
342
|
+
|
343
|
+
# config.assets.css_compressor = :sass
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
348
|
+
|
349
|
+
config.assets.compile = true
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
358
|
+
|
359
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
# Specifies the header that your server uses for sending files.
|
364
|
+
|
365
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
366
|
+
|
367
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
# Mount Action Cable outside main process or domain
|
372
|
+
|
373
|
+
# config.action_cable.mount_path = nil
|
374
|
+
|
375
|
+
# config.action_cable.url = 'wss://example.com/cable'
|
376
|
+
|
377
|
+
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http://example.*/ ]
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
382
|
+
|
383
|
+
# config.force_ssl = true
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
388
|
+
|
389
|
+
# when problems arise.
|
390
|
+
|
391
|
+
config.log_level = :debug
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
# Prepend all log lines with the following tags.
|
396
|
+
|
397
|
+
config.log_tags = [ :request_id ]
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
# Use a different cache store in production.
|
402
|
+
|
403
|
+
# config.cache_store = :mem_cache_store
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
# Use a real queuing backend for Active Job (and separate queues per environment)
|
408
|
+
|
409
|
+
# config.active_job.queue_adapter = :resque
|
410
|
+
|
411
|
+
# config.active_job.queue_name_prefix = "cose_#{Rails.env}"
|
412
|
+
|
413
|
+
config.action_mailer.perform_caching = false
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
418
|
+
|
419
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
420
|
+
|
421
|
+
# config.action_mailer.raise_delivery_errors = false
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
426
|
+
|
427
|
+
# the I18n.default_locale when a translation cannot be found).
|
428
|
+
|
429
|
+
config.i18n.fallbacks = true
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
# Send deprecation notices to registered listeners.
|
434
|
+
|
435
|
+
config.active_support.deprecation = :notify
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
440
|
+
|
441
|
+
config.log_formatter = ::Logger::Formatter.new
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
# Use a different logger for distributed setups.
|
446
|
+
|
447
|
+
# require 'syslog/logger'
|
448
|
+
|
449
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
454
|
+
|
455
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
456
|
+
|
457
|
+
logger.formatter = config.log_formatter
|
458
|
+
|
459
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
460
|
+
|
461
|
+
end
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
# Do not dump schema after migrations.
|
466
|
+
|
467
|
+
config.active_record.dump_schema_after_migration = false
|
468
|
+
|
469
|
+
end
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
```
|