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

Use django-environ to load Env variables #11

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pxwxnvermx
Copy link
Contributor

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.

@pxwxnvermx pxwxnvermx self-assigned this Jan 10, 2024
Copy link
Collaborator

@calellowitz calellowitz left a 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
Copy link
Collaborator

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

Copy link
Contributor Author

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.

TWILIO_AUTH_TOKEN = env("TWILIO_AUTH_TOKEN")
TWILIO_MESSAGING_SERVICE = env("TWILIO_MESSAGING_SERVICE")

FCM_CREDENTIALS = env("FCM_CREDENTIALS", default=None)
Copy link
Member

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)

Copy link
Contributor Author

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 *
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. 14d18c0

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.

3 participants