Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support auto-configuration of the DATABASE_URL environment variable #153

Open
tcdowney opened this issue Jan 6, 2022 · 1 comment
Open
Labels
enhancement A new feature or request

Comments

@tcdowney
Copy link

tcdowney commented Jan 6, 2022

This is a feature suggestion, not a bug or problem, so I'm going to deviate from the normal template.


Background

Rails apps by convention use the contents of the DATABASE_URL environment variable to connect to the application's database.

Historically PaaSes have attempted to automatically configure this for developers based on what services they have bound:

Feature Suggestion

This is inspired by the spring-boot buildpack's support for CNB Bindings.

One of the existing Ruby sub-buildpacks or a more Rails-specific buildpack could exist that looks for CNB Bindings that match conventional types. Spring Cloud Bindings look for a variety of types like mysql, postgres, mongodb, etc. Or you could even do some introspection into the Gemfile (like the classic Heroku buildpack does) to have a better idea of what to look for.

Anyways, throwing this out there. Could be a quality-of-life improvement for Rails apps that want to use the Ruby CNB.


cc: @dsboulder who was digging into how DATABASE_URL was provided in CF with me and originally had this idea.

@sophiewigmore
Copy link
Member

@tcdowney @dsboulder thanks for the issue. This seems like a reasonable ask, I'm going to transfer it to the Paketo Rails Assets buildpack repo!

@sophiewigmore sophiewigmore transferred this issue from paketo-buildpacks/ruby Jan 7, 2022
@sophiewigmore sophiewigmore added the enhancement A new feature or request label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or request
Projects
None yet
Development

No branches or pull requests

2 participants