質問編集履歴

1

environmentsとdeployのproduction.rbファイル及び、エラーログの追記を致しました。

2019/12/28 06:53

投稿

sinzanmono46
sinzanmono46

スコア6

test CHANGED
File without changes
test CHANGED
@@ -88,6 +88,86 @@
88
88
 
89
89
  ** Refer to log/capistrano.log for details. Here are the last 20 lines:
90
90
 
91
+
92
+
93
+ DEBUG [b30eab60] * listen (3.1.5)
94
+
95
+
96
+
97
+ DEBUG [b30eab60] * parallel (1.19.1)
98
+
99
+
100
+
101
+ DEBUG [b30eab60] * parser (2.6.5.0)
102
+
103
+
104
+
105
+ DEBUG [b30eab60] * rainbow (3.0.0)
106
+
107
+
108
+
109
+ DEBUG [b30eab60] * ruby-progressbar (1.10.1)
110
+
111
+
112
+
113
+ DEBUG [b30eab60] * unicode-display_width (1.6.0)
114
+
115
+
116
+
117
+ DEBUG [b30eab60] * rubocop (0.78.0)
118
+
119
+
120
+
121
+ DEBUG [b30eab60] * spring (2.1.0)
122
+
123
+
124
+
125
+ DEBUG [b30eab60] * spring-watcher-listen (2.0.1)
126
+
127
+
128
+
129
+ DEBUG [b30eab60] * web-console (4.0.1)
130
+
131
+
132
+
133
+ DEBUG [b30eab60] Install missing gems with `bundle install`
134
+
135
+
136
+
137
+ DEBUG [b30eab60] Finished in 0.407 seconds with exit status 1 (failed).
138
+
139
+
140
+
141
+ INFO [086f0268] Running $HOME/.rbenv/bin/rbenv exec bundle install --path /var/www/datingapp/shared/bundle --jobs 4 --without development test --deployment --quiet as ec2-user@18.176.69.6
142
+
143
+
144
+
145
+ DEBUG [086f0268] Command: cd /var/www/datingapp/releases/20191228064323 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.1" ; $HOME/.rbenv/bin/rbenv exec bundle install --path /var/www/datingapp/shared/bundle --jobs 4 --without development test --deployment --quiet )
146
+
147
+
148
+
149
+ INFO [086f0268] Finished in 0.531 seconds with exit status 0 (successful).
150
+
151
+
152
+
153
+ DEBUG [9c74a943] Running if test ! -d /var/www/datingapp/releases/20191228064323; then echo "Directory does not exist '/var/www/datingapp/releases/20191228064323'" 1>&2; false; fi as ec2-user@18.176.69.6
154
+
155
+
156
+
157
+ DEBUG [9c74a943] Command: if test ! -d /var/www/datingapp/releases/20191228064323; then echo "Directory does not exist '/var/www/datingapp/releases/20191228064323'" 1>&2; false; fi
158
+
159
+
160
+
161
+ DEBUG [9c74a943] Finished in 0.123 seconds with exit status 0 (successful).
162
+
163
+
164
+
165
+ INFO [5c099478] Running $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile as ec2-user@18.176.69.6
166
+
167
+
168
+
169
+ DEBUG [5c099478] Command: cd /var/www/datingapp/releases/20191228064323 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.1" RAILS_ENV="production" RAILS_GROUPS="" ; $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile )
170
+
91
171
  ```
92
172
 
93
173
  **Gemfile**
@@ -411,3 +491,103 @@
411
491
  end
412
492
 
413
493
  ```
494
+
495
+ **config/environments/production.rb**
496
+
497
+ ```
498
+
499
+ Rails.application.configure do
500
+
501
+ # Settings specified here will take precedence over those in config/application.rb.
502
+
503
+
504
+
505
+ config.cache_classes = true
506
+
507
+
508
+
509
+ config.eager_load = true
510
+
511
+
512
+
513
+ config.consider_all_requests_local = false
514
+
515
+ config.action_controller.perform_caching = true
516
+
517
+
518
+
519
+ config.require_master_key = true
520
+
521
+
522
+
523
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
524
+
525
+
526
+
527
+ config.assets.compile = false
528
+
529
+
530
+
531
+ # Store uploaded files on the local file system (see config/storage.yml for options).
532
+
533
+ config.active_storage.service = :amazon
534
+
535
+
536
+
537
+ config.force_ssl = true
538
+
539
+
540
+
541
+ config.log_level = :debug
542
+
543
+
544
+
545
+ config.log_tags = [:request_id]
546
+
547
+
548
+
549
+ config.action_mailer.perform_caching = false
550
+
551
+
552
+
553
+ config.i18n.fallbacks = true
554
+
555
+
556
+
557
+ config.active_support.deprecation = :notify
558
+
559
+
560
+
561
+ config.log_formatter = ::Logger::Formatter.new
562
+
563
+
564
+
565
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
566
+
567
+ logger = ActiveSupport::Logger.new(STDOUT)
568
+
569
+ logger.formatter = config.log_formatter
570
+
571
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
572
+
573
+ end
574
+
575
+
576
+
577
+ # Do not dump schema after migrations.
578
+
579
+ config.active_record.dump_schema_after_migration = false
580
+
581
+ end
582
+
583
+ ```
584
+
585
+
586
+
587
+ **config/deploy/production.rb**
588
+
589
+ ```
590
+
591
+ server "11.111.11.1", user: "ec2-user", roles: %w{app db web}
592
+
593
+ ```