feat: make server host configurable

This commit is contained in:
arkohut 2024-08-29 17:01:02 +08:00
parent 75bb7aeef9
commit 0970e73da5
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ class Settings(BaseSettings):
typesense_collection_name: str = "entities"
# Server settings
server_host: str = "0.0.0.0" # Add this line
server_port: int = 8080
# VLM plugin settings

View File

@ -709,7 +709,7 @@ def run_server():
uvicorn.run(
"memos.server:app",
host="0.0.0.0",
host=settings.server_host, # Use the new server_host setting
port=settings.server_port,
reload=False,
log_config=LOGGING_CONFIG,