質問編集履歴

1

config/deploy/production.rbとconfig/environments/production.rbを追加しました。

2020/06/24 13:02

投稿

aiuhaeufh08
aiuhaeufh08

スコア0

test CHANGED
File without changes
test CHANGED
@@ -230,12 +230,104 @@
230
230
 
231
231
 
232
232
 
233
+ ### ファイル
234
+
235
+ ■config/deploy/production.rb
236
+
237
+ ```
238
+
239
+ role :web, %w{aiuhaeufh08@××.×××.×××.×××}
240
+
241
+ role :app, %w{aiuhaeufh08@××.×××.×××.×××}
242
+
243
+ role :db, %w{aiuhaeufh08@××.×××.×××.×××}
244
+
245
+
246
+
247
+ server "××.×××.×××.×××",
248
+
249
+ user: "aiuhaeufh08",
250
+
251
+ roles: %w{app db web}
252
+
253
+
254
+
255
+ set :ssh_options, {
256
+
257
+ keys: %w(~/.ssh/key_rsa),
258
+
259
+ forward_agent: false,
260
+
261
+ auth_methods: %w(publickey)
262
+
263
+ }
264
+
265
+ ```
266
+
267
+
268
+
269
+ ■config/environments/production.rb
270
+
271
+ ```
272
+
273
+ Rails.application.configure do
274
+
275
+ config.cache_classes = true
276
+
277
+ config.eager_load = true
278
+
279
+ config.consider_all_requests_local = false
280
+
281
+ config.action_controller.perform_caching = true
282
+
283
+ config.require_master_key = true
284
+
285
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
286
+
287
+ config.assets.compile = false
288
+
289
+ config.active_storage.service = :local
290
+
291
+ config.log_level = :debug
292
+
293
+ config.log_tags = [ :request_id ]
294
+
295
+ config.action_mailer.perform_caching = false
296
+
297
+ config.i18n.fallbacks = true
298
+
299
+ config.active_support.deprecation = :notify
300
+
301
+ config.log_formatter = ::Logger::Formatter.new
302
+
303
+
304
+
305
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
306
+
307
+ logger = ActiveSupport::Logger.new(STDOUT)
308
+
309
+ logger.formatter = config.log_formatter
310
+
311
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
312
+
313
+ end
314
+
315
+
316
+
317
+ config.active_record.dump_schema_after_migration = false
318
+
319
+ end
320
+
321
+ ```
322
+
323
+
324
+
233
325
  ### 補足情報(FW/ツールのバージョンなど)
234
326
 
235
327
 
236
328
 
329
+ Rails 6.0.3.2
330
+
237
331
  Ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
238
332
 
239
- Rails 6.0.3.2
240
-
241
- ローカル、サーバー共に
333
+ (ローカルはanyenv、サーバーはrbenv)