fix:启动端口改由环境变量控制
This commit is contained in:
@@ -17,7 +17,7 @@ class Settings(BaseSettings):
|
||||
extra='ignore' # 忽略环境变量中多余的键
|
||||
)
|
||||
# 启动端口
|
||||
SERVE_PROD: int = Field(default=8000, description='')
|
||||
SERVE_PORT: int = Field(default=8000, description='')
|
||||
# 调试配饰
|
||||
LOCAL: int = Field(default=0, description="是否在本地运行,1表示本地运行,0表示生产环境运行")
|
||||
|
||||
|
||||
@@ -27,4 +27,4 @@ if __name__ == "__main__":
|
||||
agent_api = LCAgent(enable_async=True, api_path='/api/v1/agent')
|
||||
reface_api = ReFace(api_path='/api/v1/reface')
|
||||
server = ls.LitServer([chat_boot_api, agent_api, reface_api])
|
||||
server.run(port=settings.SERVE_PROD)
|
||||
server.run(port=8000)
|
||||
|
||||
Reference in New Issue
Block a user