0
1

More than 3 years have passed since last update.

AWSを使ってデプロイ

Posted at

はじめに

 AWSを初めて使ってみたが、難しすぎる…
 完全に自分用メモ

EC2のサーバーにログイン

ssh ~ user@ ~ #ユーザー名とElastic IP アドレスの入ったコード

以下、ログイン状態で実行

デプロイ方法

# 開発中のアプリケーションに移動
cd /var/www/アプリケーション名
# GitHubの内容をEC2に反映させる
git pull origin master

Unicornの再起動方法

  1. プロセスを確認
ps aux | grep unicorn
  1. プロセスをkill
kill プロセス番号
  1. unicorn_railsコマンドを実行
RAILS_SERVE_STATIC_FILES=1 unicorn_rails -c config/unicorn.rb -E production -D

エラーログの確認

sudo less /var/log/nginx/error.log
0
1
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
0
1