-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use django-environ to load Env variables #11
base: main
Are you sure you want to change the base?
Conversation
2f29c4c
to
7bc9a59
Compare
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.
As long as we know what is up with the requirements, this looks good
@@ -6,8 +6,6 @@ | |||
# | |||
asgiref==3.6.0 | |||
# via django | |||
build==0.10.0 |
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.
do you know why there are so many requirements changes
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.
Yeah, pip-tools is not in the requirements.in
file, so on pip-compile pip-tools and its dependencies were removed.
connectid/settings.py
Outdated
TWILIO_AUTH_TOKEN = env("TWILIO_AUTH_TOKEN") | ||
TWILIO_MESSAGING_SERVICE = env("TWILIO_MESSAGING_SERVICE") | ||
|
||
FCM_CREDENTIALS = env("FCM_CREDENTIALS", default=None) |
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.
We should probably allow only individual fields within FCM_CREDENTIALs to be configured via env? (instead of the full JSON)
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.
Fixed. 14d18c0
@@ -196,10 +197,38 @@ | |||
"DELETE_INACTIVE_DEVICES": False, | |||
} | |||
|
|||
from .localsettings import * |
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.
We are missing two settings from prod here CSRF_TRUSTED_ORIGINS
and private-key part of OAUTH2_PROVIDER
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.
Fixed. 14d18c0
Added django-environ to load environment variables (db_url, secret etc.) from
.env
files..env_example
file lists all the variables that need to be added.