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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy/test-server/install-pn-test-server
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ su pn -c '
cp -p /physionet/physionet-build/deploy/post-receive hooks/post-receive

cd /physionet/physionet-build
grep -v ^SECRET_KEY= < .env.example > .env
grep -v -e ^SECRET_KEY= -e ^DB_PASSWORD= < .env.example > .env
printf SECRET_KEY=%s\\n "$SECRET_KEY" >> .env
printf DATABASES_PASSWORD=%s\\n "$DBPASSWORD" >> .env
printf DB_PASSWORD=%s\\n "$DBPASSWORD" >> .env
chgrp www-data .env
chmod 640 .env

Expand Down
8 changes: 4 additions & 4 deletions physionet-django/physionet/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'physionet',
'USER': 'physionet',
'PASSWORD': config('DATABASES_PASSWORD'),
'HOST': 'localhost',
'NAME': config('DB_NAME'),
'USER': config('DB_USER'),
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST'),
'PORT': '',
}
}
Expand Down
8 changes: 4 additions & 4 deletions physionet-django/physionet/settings/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'physionet',
'USER': 'physionet',
'PASSWORD': config('DATABASES_PASSWORD'),
'HOST': 'localhost',
'NAME': config('DB_NAME'),
'USER': config('DB_USER'),
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST'),
'PORT': '',
}
}
Expand Down
Loading