-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
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)
heroku-buildpack-ruby/lib/language_pack/rack.rb
Lines 9 to 11 in 104fe3a
| def self.use? | |
| bundler.gem_version('rack') | |
| end |
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:
heroku-buildpack-ruby/lib/language_pack/rack.rb
Lines 23 to 32 in 104fe3a
def default_process_types # let's special case thin here if we detect it web_process = bundler.has_gem?("thin") ? "bundle exec thin start -R config.ru -e $RACK_ENV -p ${PORT:-5000}" : "bundle exec rackup config.ru -p ${PORT:-5000}" super.merge({ "web" => web_process }) end