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

Allow customization of the production database.yml #14286

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

oliverguenther
Copy link
Member

@oliverguenther oliverguenther commented Nov 30, 2023

For helm charts, it is useful to separate database options from the password credentials, so that they can be retrieved from e.g., a separate secret store. We currently do not support this as we require a single DATABASE_URL to be present.

But Rails actually allows you to merge a DATABASE_URL with separate configuration options in the database.yml. This PR allows you to do exactly this:

OPENPROJECT_DB_PASSWORD=foo DATABASE_URL=postgres://openprojectasdf@localhost/tmp rails console

While we're at it, we allow all other options that currently require a lengthy DATABASE_URL as separate env variables.

Copy link
Member

@machisuji machisuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🙏

@machisuji machisuji merged commit b7e402b into dev Nov 30, 2023
7 of 8 checks passed
@machisuji machisuji deleted the feature/production-database-yml branch November 30, 2023 14:30
@machisuji
Copy link
Member

machisuji commented Nov 30, 2023

The single feature spec failure is certain not to be caused by a PR changing the database.yml so I've merged it despite that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants