Skip to content

Commit 7435b0d

Browse files
committed
small fixes on config settings
1 parent 5297e72 commit 7435b0d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from app.src.config import (
1414
API_ENDPOINT_HOST,
1515
API_ENDPOINT_PORT,
16+
APP_DOCKER_PORT,
1617
DEBUG_MODE,
1718
PROJECT_NAME,
1819
API_V1_STR,
@@ -77,8 +78,8 @@ def on_startup():
7778

7879
@app.get("/")
7980
def index():
80-
url_swagger = f"http://{API_ENDPOINT_HOST}:{API_ENDPOINT_PORT}/docs"
81-
url_redoc = f"http://{API_ENDPOINT_HOST}:{API_ENDPOINT_PORT}/redoc"
81+
url_swagger = f"http://{API_ENDPOINT_HOST}:{APP_DOCKER_PORT}/docs"
82+
url_redoc = f"http://{API_ENDPOINT_HOST}:{APP_DOCKER_PORT}/redoc"
8283
body = (
8384
"<html>"
8485
"<body style='padding: 10px;'>"

app/src/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111

1212
# Set the application variables
13-
API_ENDPOINT_PORT: int = int(os.environ.get("API_ENDPOINT_PORT", 8042))
13+
API_ENDPOINT_PORT: int = int(os.environ.get("API_ENDPOINT_PORT", 8000))
14+
APP_DOCKER_PORT: int = int(os.environ.get("APP_DOCKER_PORT", 8042))
1415
API_ENDPOINT_HOST: str = os.environ.get("API_ENDPOINT_HOST", "127.0.0.1")
1516
APP_SECRET_KEY: str = os.environ.get("APP_SECRET_KEY", "DEVtest42!!")
1617
APP_API_TOKEN: str = os.environ.get("APP_API_TOKEN", "PythonBiellaGroup")

0 commit comments

Comments
 (0)