heroku / heroku-buildpack-ruby

Heroku's buildpack for Ruby applications.
MIT License
788 stars 1.87k forks source link

Allow custom database.yml without activerecord #1325

Open JacobEvelyn opened 1 year ago

JacobEvelyn commented 1 year ago

I previously opened #1278 for this issue and I'm not sure why it was closed. This buildpack overwrites our config/database.yml unless we have activerecord in our Gemfile, but we don't actually use activerecord (we use the sequel gem instead, which also uses config/database.yml). Is there a way this buildpack can allow us to remove activerecord from our Gemfile without overwriting our config/database.yml file?

Requiring a gem we don't need is annoying, slows down our bundle install times, and increases our surface area for security vulnerabilities.

schneems commented 10 months ago

Ahh. I didn't understand the request fully. I see and understand it. I'm not sure how to gate or guard this logic though. A simple solution would be to add an escape valve-like env var check like HEROKU_SKIP_DATABASE_YML_WRITE=1

Would something like that work for you?

JacobEvelyn commented 9 months ago

That probably would work, but we've actually migrated off of Heroku so I personally am less invested in this issue.