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

Implement a default database URL #10296

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Aug 28, 2024

This implements a default database URL, which is postgresql:// for production and postgresql:///foreman-$ENV otherwise. That means using a unix socket to connect to, which implies the username and doesn't need any password. When no database name is given (like in production) PostgreSQL assumes one that matches the username.

By doing this, there is no need for a config/database.yml file which simplifies setup.

I'm not sure if this is a good idea or not. It'll still be needed for remote DBs and in case you need to override the pool size. It does make development and testing easier.

This implements a default database URL, which is postgresql:// for
production and postgresql:///foreman-$ENV otherwise. That means using
a unix socket to connect to, which implies the username and doesn't need
any password. When no database name is given (like in production)
PostgreSQL assumes one that matches the username.

By doing this, there is no need for a config/database.yml file which
simplifies setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant