1
1

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 5 years have passed since last update.

capistrano3 + capistrano-rails + capistrano3-unicorn でよく使うタスク

1
Posted at

バージョン

version
capistrano 3.4.0
capistrano-rails 1.1.3
capistrano3-unicorn 0.2.1

capistrano タスク

タスクの確認

$ bundle exec cap -T

デプロイ

-t (--trace) オプションをつけています。どんな順番でタスクが処理されているかがわかるので好きです。

$ bundle exec cap -t production deploy

環境変数を渡したい場合、後ろに指定しています。

$ bundle exec cap -t production deploy BRANCH=feature/new-actions

unicorn の停止

$ bundle exec cap -t production unicorn:stop

unicorn の開始

$ bundle exec cap -t production unicorn:start

unicorn worker プロセスを増やす

$ bundle exec cap -t production unicorn:add_worker

unicorn worker プロセスを減らす

$ bundle exec cap -t production unicorn:remove_worker
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?