0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

デプロイ時 よく使ったコマンドメモ 自分用

Last updated at Posted at 2020-03-27

#unicorn
起動 
bundle exec unicorn_rails -c config/unicorn.rb
unicorn_rails -c /var/www/rails/(アプリの名前)/config/unicorn.conf.rb -D -E production

状態確認
ps -ef | grep unicorn | grep -v grep

#mysql
起動
sudo service mysqld start

production環境でのDB削除
RAILS_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bundle exec rake db:drop

接続
mysql -h エンドポイント -P 3306 -u root -p

DBの文字コードチェック
show variables like "chara%";

#nignx
再起動
sudo nginx -s reload

#vimコマンド
強制書き込み
$ sudo vim <ファイル名>
:w !sudo tee %
:q!

#プリコンパイル
bundle exec rake assets:precompile RAILS_ENV=production

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?