-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat: parameterize Django database path/deletion #1770
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
back-end
Django views, sessions, middleware, models, migrations etc.
label
Nov 1, 2023
Coverage reportThe coverage rate went from
Diff Coverage details (click to unfold)benefits/settings.py
|
thekaveman
added
the
documentation
[auto] Improvements or additions to documentation
label
Nov 1, 2023
thekaveman
force-pushed
the
feat/db-params
branch
from
November 1, 2023 23:03
fd2aaef
to
99a7431
Compare
thekaveman
force-pushed
the
chore/devcontainer
branch
from
November 1, 2023 23:06
548c112
to
70ea25d
Compare
set via the DJANGO_DB_DIR environment variable default to the current directory '.'
remove reference to a Docker env var that is no longer used
DJANGO_DB_RESET is true by default to maintain existing behavior
thekaveman
force-pushed
the
feat/db-params
branch
from
November 1, 2023 23:09
99a7431
to
0839086
Compare
5 tasks
angela-tran
approved these changes
Nov 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me
thekaveman
changed the title
Feat: parameterize Django database
Feat: parameterize Django database path/deletion
Nov 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
back-end
Django views, sessions, middleware, models, migrations etc.
documentation
[auto] Improvements or additions to documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1763
Testing / review
In your local
.env
file, try different values for the environment variables.Note the
DJANGO_DB_DIR
must already exist!E.g. to create the database file in a local (to your repo) directory called
db
:# make sure the directory exists! mkdir db
Then set the environment variable and reload your devcontainer:
Verify
bin/init.sh
output:Set
DJANGO_DB_RESET
tofalse
to keep the database between restarts/reinits:Verify
bin/init.sh
output:Before merge
django-db-dir
secret in Key Vault (x3), set to/home/site/wwwroot
django-db-reset
secret in Key Vault (x3), set totrue
After merge
You shouldn't have to make any changes to your local setup, unless you want to per the above settings.