Skip to content

Commit

Permalink
feat(rds): fix rds password in production settings
Browse files Browse the repository at this point in the history
  • Loading branch information
briancaffey committed Feb 28, 2024
1 parent f5a7d0a commit 0ad006e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/apps/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions backend/backend/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

from .base import *

from apps.core.utils import from_secret

DEBUG = 0

DATABASES["default"]["OPTIONS"] = {
"sslmode": "verify-full",
"sslrootcert": "/usr/local/share/global-bundle.pem",
}

DATABASES["default"]["PASSWORD"] = from_secret()

# add django-storages to INSTALLED_APPS
INSTALLED_APPS += ("storages",)

Expand Down

0 comments on commit 0ad006e

Please sign in to comment.