Skip to content

Commit

Permalink
fix: make production plugins settings managable from environment (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
wowkalucky committed Feb 23, 2024
1 parent 6a572cd commit 9dc8b93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions credentials/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
AWS_SES_REGION_NAME = environ.get("AWS_SES_REGION_NAME", "us-east-1")
AWS_SES_REGION_ENDPOINT = environ.get("AWS_SES_REGION_ENDPOINT", "email.us-east-1.amazonaws.com")

# Inject plugin settings before the configuration file overrides (so it is possible to manage those settings via environment).
add_plugins(__name__, PROJECT_TYPE, SettingsType.PRODUCTION)


CONFIG_FILE = get_env_setting("CREDENTIALS_CFG")
with open(CONFIG_FILE, encoding="utf-8") as f:
config_from_yaml = yaml.safe_load(f)
Expand Down Expand Up @@ -60,5 +64,3 @@

for override, value in DB_OVERRIDES.items():
DATABASES["default"][override] = value

add_plugins(__name__, PROJECT_TYPE, SettingsType.PRODUCTION)

0 comments on commit 9dc8b93

Please sign in to comment.