はじめに
AWSを初めて使ってみたが、難しすぎる…
完全に自分用メモ
EC2のサーバーにログイン
ssh ~ user@ ~ #ユーザー名とElastic IP アドレスの入ったコード
以下、ログイン状態で実行
デプロイ方法
# 開発中のアプリケーションに移動
cd /var/www/アプリケーション名
# GitHubの内容をEC2に反映させる
git pull origin master
Unicornの再起動方法
- プロセスを確認
ps aux | grep unicorn
- プロセスをkill
kill プロセス番号
- unicorn_railsコマンドを実行
RAILS_SERVE_STATIC_FILES=1 unicorn_rails -c config/unicorn.rb -E production -D
エラーログの確認
sudo less /var/log/nginx/error.log