diff --git a/backend/apps/core/utils.py b/backend/apps/core/utils.py index 23e1c9a..d542366 100644 --- a/backend/apps/core/utils.py +++ b/backend/apps/core/utils.py @@ -7,7 +7,7 @@ ) client = botocore.session.get_session().create_client( - "secretsmanager", region_name="us-east-1" + "secretsmanager", region_name=os.environ.get("AWS_REGION", "us-east-1") ) cache = SecretCache(client=client) diff --git a/backend/backend/settings/production.py b/backend/backend/settings/production.py index 45f05a1..57fbfd8 100644 --- a/backend/backend/settings/production.py +++ b/backend/backend/settings/production.py @@ -2,6 +2,8 @@ from .base import * +from apps.core.utils import from_secret + DEBUG = 0 DATABASES["default"]["OPTIONS"] = { @@ -9,6 +11,8 @@ "sslrootcert": "/usr/local/share/global-bundle.pem", } +DATABASES["default"]["PASSWORD"] = from_secret() + # add django-storages to INSTALLED_APPS INSTALLED_APPS += ("storages",)