Closed orino-gif closed 3 years ago
AWS IAMユーザーで料金表が見られるように設定
メモリー不足を発見。インスタンスタイプをt3.largeに変更。メモリー2GB→4GB。
アセットのファイルが見当たらない事が原因で、ブラウザ上に以下のエラーが出力される。
production環境で、/illustlife/config/environments/production.rbの config.assets.compile がfalseに設定されていた。
以下のコマンドで事前にアセットをコンパイル。 bundle exec rake assets:precompile RAILS_ENV=production
ブラウザ上でCSSの設定が反映されない
本番用でメール認証の送信が不能。アカウント登録直後のページ遷移後にエラー発生。
config.action_mailer.default_url_options = { host: 'defomate.com'} ↓ config.action_mailer.default_url_options = { host: 'defomate.net', port:3000}
にすると認証可能。
メール認証先のリンク先をみると、httpでアクセスしています。
http://defomate.net:3000/users/confirmation?confirmation_token=nweirxsxdfzjsk3XwN38
本番環境では、httpsでアクセスできるように設定しているので、 その辺りが少なくとも原因の一つと考えられます。
メール認証のリンク先をhttpsに変更する方法をご教示ください。
メール認証のリンク先をhttpからhttpsに変更 config.action_mailer.default_url_options = { host: 'defomate.com'} ↓ config.action_mailer.default_url_options = { :host => 'defomate.com', :protocol => 'https' }
動作確認済み。
EC2リザーブドインスタンスを本番用に利用