heroku-buildpack-ruby
heroku-buildpack-ruby copied to clipboard
Only add default web dyno if `config.ru` exists
You could have an app that is not an web app, but for whatever reasons, it has rack as a dependency. Then, the buildpack would automatically add a web dyno to that app when it is deployed for the first time (maybe you do some automated testing with Terraform)
https://github.com/heroku/heroku-buildpack-ruby/blob/104fe3a374e07a8f3723f110c2148d57ecb9ee79/lib/language_pack/rack.rb#L9-L11
I discussed changing this with @schneems at https://ruby.social/@Schneems/109514562198812396
I don't want to gate on random env vars in general if i can avoid it. I prefer to look for more specific signals if possible.
I would take a PR that gates this behavior on the existance of another file like config.ru considering we use that file in the command:
https://github.com/heroku/heroku-buildpack-ruby/blob/104fe3a374e07a8f3723f110c2148d57ecb9ee79/lib/language_pack/rack.rb#L23-L32
Thanks a ton for the issue. I would accept this change.