LoginSignup
4
4

More than 3 years have passed since last update.

EC2手動デプロイに失敗してしまったので対応内容のメモ

Last updated at Posted at 2020-06-22

EC2デプロイ

EC2インスタンスにて手動デプロイを行った際、こけた内容をメモします。

Nodeを使用する場合

サーバー側追記設定
BootStrapなど使用している場合サーバー側にNodeのインストールが必要になります。

node.sh
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
sudo yum install -y nodejs
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install -y yarn 

コンソールのエラーログに bundle instal関連が記載されていた場合

libcurl.sh
sudo yum -y install curl
sudo yum -y install libcurl libcurl-devel

S3が反映されなかった場合

設定周りで問題がない場合、EC2インスタンス再起動

本番環境にシードファイルを実行する場合

EC2上で実行

seed.sh
cd /var/www/アプリケーション名/
cd current/
bundle exec rails db:seed RAILS_ENV=production

参考資料

http://blog.serverworks.co.jp/tech/2020/01/19/rails6/
https://qiita.com/pieroplus/items/a9a7b2d1bf1674bdc622
https://qiita.com/potterqaz/items/01e1279989f9494c488a

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4