LoginSignup
22
24

More than 5 years have passed since last update.

開発環境用Procfile

Last updated at Posted at 2012-12-26
  • Herokuでwebrickじゃなくてthinを使いたい
  • 開発環境ではforemanでguardを起動したい。.envで必要な環境変数をロードしたいので。
  • でもHerokuではguardはいらない。

という理由から、production環境用Procfileとdevelopment環境用Procfileを分けたいと思ったので、以下のようにしてみた。

Procfile
web: rails s thin -p $PORT
Procfile.development
web: rails s thin
guard: guard
.foreman
procfile: Procfile.development
.gitignore
.foreman
  • .foremanはforemanコマンドのデフォルトオプションを指定できる。
  • procfileオプションで実行するProcfileを指定できる。
  • .foremanファイルを.gitignoreに追加してHerokuで実行しないようにする。
22
24
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
22
24