Skip to content

Commit

Permalink
feat: Changed remote db default configs
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed Oct 8, 2024
1 parent 4c6abdb commit 39f4bdb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upsonic_on_prem/dash/dash/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

remote_db=os.environ.get("remote_db", "false").lower() == "true"

if not remote_db:
db_host=os.environ.get("db_host", "localhost")

if db_host == "localhost":
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
Expand All @@ -154,7 +155,7 @@
db_name=os.environ.get("db_name")
db_user=os.environ.get("db_user")
db_pass=os.environ.get("db_pass")
db_host=os.environ.get("db_host")

db_port=os.environ.get("db_port")

DATABASES = {
Expand Down

0 comments on commit 39f4bdb

Please sign in to comment.