Foreman: Use different Procfile in development and production

前端 未结 4 432
抹茶落季
抹茶落季 2020-12-23 02:28

I have a homemade Sinatra application for which I intend to use Heroku to host it.

I use foreman and shotgun in development, with the following Procfile:

<         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-23 02:48

    @sharagoz 's comment on the selected answer, in my opinion, is the best option to allow you to still use foreman start without adding additional arguments AND keep your Procfile separate for Heroku.

    To avoid the -f Procfile.dev parameter you can create a .foreman file with procfile: Procfile.dev in it – Sharagoz

    In my applications root directory I created a .foreman file and as the comment states

    .foreman

    procfile: Procfile.dev
    

    Procfile

    web: bundle exec puma -C config/puma.rb
    

    Procfile.dev

    web: bundle exec puma -C config/puma.rb
    webpacker: ./bin/webpack-dev-server
    

提交回复
热议问题