Skip to content

Commit

Permalink
small fixes on config settings
Browse files Browse the repository at this point in the history
  • Loading branch information
JeyDi committed Oct 11, 2021
1 parent 5297e72 commit 7435b0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from app.src.config import (
API_ENDPOINT_HOST,
API_ENDPOINT_PORT,
APP_DOCKER_PORT,
DEBUG_MODE,
PROJECT_NAME,
API_V1_STR,
Expand Down Expand Up @@ -77,8 +78,8 @@ def on_startup():

@app.get("/")
def index():
url_swagger = f"http://{API_ENDPOINT_HOST}:{API_ENDPOINT_PORT}/docs"
url_redoc = f"http://{API_ENDPOINT_HOST}:{API_ENDPOINT_PORT}/redoc"
url_swagger = f"http://{API_ENDPOINT_HOST}:{APP_DOCKER_PORT}/docs"
url_redoc = f"http://{API_ENDPOINT_HOST}:{APP_DOCKER_PORT}/redoc"
body = (
"<html>"
"<body style='padding: 10px;'>"
Expand Down
3 changes: 2 additions & 1 deletion app/src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@


# Set the application variables
API_ENDPOINT_PORT: int = int(os.environ.get("API_ENDPOINT_PORT", 8042))
API_ENDPOINT_PORT: int = int(os.environ.get("API_ENDPOINT_PORT", 8000))
APP_DOCKER_PORT: int = int(os.environ.get("APP_DOCKER_PORT", 8042))
API_ENDPOINT_HOST: str = os.environ.get("API_ENDPOINT_HOST", "127.0.0.1")
APP_SECRET_KEY: str = os.environ.get("APP_SECRET_KEY", "DEVtest42!!")
APP_API_TOKEN: str = os.environ.get("APP_API_TOKEN", "PythonBiellaGroup")
Expand Down

0 comments on commit 7435b0d

Please sign in to comment.