diff --git a/app/config.py b/app/config.py index 0d83b4e..7718fca 100644 --- a/app/config.py +++ b/app/config.py @@ -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表示生产环境运行") diff --git a/app/main.py b/app/main.py index 0895586..bdfbf36 100644 --- a/app/main.py +++ b/app/main.py @@ -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) diff --git a/docker-compose.yml b/docker-compose.yml index ae7dd86..a91ba35 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: - ./google_application_credentials.json:/google_application_credentials.json - /etc/localtime:/etc/localtime:ro ports: - - "10070:8000" + - "${SERVE_PORT}:8000" deploy: resources: reservations: