heroku-buildpack-ruby icon indicating copy to clipboard operation
heroku-buildpack-ruby copied to clipboard

Only add default web dyno if `config.ru` exists

Open dentarg opened this issue 2 years ago • 1 comments

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

dentarg avatar Jan 02 '23 19:01 dentarg

Thanks a ton for the issue. I would accept this change.

schneems avatar Jan 10 '23 17:01 schneems