Skip to content

Commit c41b18d

Browse files
Merge pull request #16 from HE-Arc/5-database
fix minor issues after backend config correction
2 parents d9212a1 + 061cca7 commit c41b18d

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

api/Pipfile

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ django = "*"
88
djangorestframework = "*"
99
django-cors-headers = "*"
1010
psycopg2-binary = "*"
11+
python-dotenv = "*"
1112

1213
[dev-packages]

api/Pipfile.lock

+10-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/fantasyforge/settings.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
"""
1212

1313
from pathlib import Path
14+
from dotenv import load_dotenv
1415
import os
1516

17+
load_dotenv()
18+
1619
# Build paths inside the project like this: BASE_DIR / 'subdir'.
1720
BASE_DIR = Path(__file__).resolve().parent.parent
1821

@@ -28,7 +31,7 @@
2831

2932
ALLOWED_HOSTS = [
3033
"127.0.0.1",
31-
"https://fantasy-forge.k8s.ing.he-arc.ch",
34+
"api-fantasy-forge.k8s.ing.he-arc.ch",
3235
]
3336

3437

@@ -86,7 +89,7 @@
8689
'NAME': os.getenv('DB_NAME'),
8790
'USER': os.getenv('DB_USER'),
8891
'PASSWORD': os.getenv('DB_PASSWORD'),
89-
'HOST': os.getenv('DB_HOST', 'localhost'), # Default to localhost
92+
'HOST': os.getenv('DB_HOST'),
9093
'PORT': os.getenv('DB_PORT', '5432'), # Default to 5432
9194
}
9295
}

api/requirements.txt

180 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)