Skip to content

Commit

Permalink
Allow port override
Browse files Browse the repository at this point in the history
  • Loading branch information
vanpelt committed Oct 21, 2024
1 parent 4f6f531 commit 663c60b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/openui/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def is_running_in_docker():
"openui.server:app",
host="0.0.0.0" if is_running_in_docker() else "127.0.0.1",
log_config=str(config_file) if ui else None,
port=7878,
port=config.PORT,
reload=reload,
)
)
Expand Down Expand Up @@ -111,7 +111,7 @@ def is_running_in_docker():
uvicorn.run(
"openui.server:app",
host="0.0.0.0" if is_running_in_docker() else "127.0.0.1",
port=7878,
port=config.PORT,
reload=reload,
)
else:
Expand Down
1 change: 1 addition & 0 deletions backend/openui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ class Env(Enum):
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
LITELLM_API_KEY = os.getenv("LITELLM_API_KEY", os.getenv("LITELLM_MASTER_KEY"))
LITELLM_BASE_URL = os.getenv("LITELLM_BASE_URL", "http://0.0.0.0:4000")
PORT = int(os.getenv("PORT", 7878))

0 comments on commit 663c60b

Please sign in to comment.