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

Configurable production database name and credentials #2219

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Conversation

bemoody
Copy link
Collaborator

@bemoody bemoody commented Apr 17, 2024

Allow configuring the production database name (and username and hostname) by bringing these old settings modules in line with the new style config variables used by physionet.settings.settings.

(All these variables should already be set correctly on all our servers, but of course we should check before deploying.)

Benjamin Moody added 2 commits April 17, 2024 16:50
Instead of hard-coding the database hostname, username, and database
name, use the config variables DB_HOST, DB_USER, and DB_NAME.
Additionally, replace the old DATABASES_PASSWORD with DB_PASSWORD.
All four new variables are now required to be defined in .env.

This is intended to bring the old settings modules in line with
physionet.settings.settings, so that eventually all three can be
unified.
The physionet.settings.staging module should now use DB_PASSWORD
instead of the old DATABASES_PASSWORD.
@bemoody
Copy link
Collaborator Author

bemoody commented Apr 17, 2024

(And I think it should be "safe" to merge this because I think the git hooks should squawk if the variables are missing, but I'm testing that right now.)

@tompollard
Copy link
Member

thanks!

@tompollard tompollard merged commit d26f2fd into dev Apr 17, 2024
8 checks passed
@tompollard tompollard deleted the bm/db-config branch April 17, 2024 21:10
tompollard added a commit that referenced this pull request Apr 24, 2024
Similar to the DB_HOST and DB_NAME variables (see also pull #2219), add
a configuration variable to control the port number for PostgreSQL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants