Skip to content

Commit

Permalink
removed deprecated MMDB_SECRET env var
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed Aug 11, 2024
1 parent 7df3c67 commit 84db9bf
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions memberportal/membermatters/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,6 @@
"PORT": os.environ.get("POSTGRES_PORT", "5432"),
}
}
elif "MMDB_SECRET" in os.environ:
# This is a JSON blob containing the database connection details, generated by "copilot" in an AWS deployment
# Fields in this JSON blob are: {username, host, dbname, password, port}
database_config = json.loads(os.environ["MMDB_SECRET"])
DATABASES = {
"default": {
"ENGINE": "django_prometheus.db.backends.mysql",
"NAME": database_config.get("dbname"),
"USER": database_config.get("username"),
"PASSWORD": database_config.get("password"),
"HOST": database_config.get("host"),
"PORT": database_config.get("port"),
}
}
else:
DATABASES = {
"default": {
Expand Down

0 comments on commit 84db9bf

Please sign in to comment.