From ecf4e3ae29714097e0296c9c24271ff9cc0bad93 Mon Sep 17 00:00:00 2001 From: zzw <1464003642@qq.com> Date: Tue, 27 Oct 2026 14:23:43 +0800 Subject: [PATCH] chore: port up --- Dockerfile | 2 +- api_server.py | 4 ++-- config/settings.py | 5 +++-- docker-compose.yml | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 79aec67..4eeadaa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,6 @@ COPY task_queue.py . COPY resident_worker.py . COPY config ./config -EXPOSE 8000 +EXPOSE 20001 CMD ["python", "api_server.py"] diff --git a/api_server.py b/api_server.py index ee1b639..adf395d 100644 --- a/api_server.py +++ b/api_server.py @@ -157,11 +157,11 @@ if __name__ == "__main__": print("="*60) print("皮肤分析 API 服务") print("="*60) - print("监听地址:http://0.0.0.0:8000") + print("监听地址:http://0.0.0.0:20001") print("提交接口:POST /api/v1/analysis/submit") print("状态查询:GET /api/v1/analysis/status/{task_id}") print("健康检查:GET /health") print("="*60) print() - uvicorn.run(app, host="0.0.0.0", port=8000) + uvicorn.run(app, host="0.0.0.0", port=20001) diff --git a/config/settings.py b/config/settings.py index 92c0cd7..55767d9 100644 --- a/config/settings.py +++ b/config/settings.py @@ -3,12 +3,13 @@ from pathlib import Path API_HOST = os.getenv( "API_HOST", - "https://skin-test-api.ailuowan.com" + # "https://skin-test-api.ailuowan.com" + "https://services-test.ailuowan.com" ) API_CALLBACK = os.getenv( "API_CALLBACK", - "/api/v1/analysis/callback" + "/api/v2/analysis/py/callback" ) # SQLite must reside on persistent local storage; Compose uses /data/analysis. diff --git a/docker-compose.yml b/docker-compose.yml index e4928ce..efb8bb6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: image: skin-py-gpu:1.0.0 working_dir: /app ports: - - "8000:8000" + - "20001:20001" volumes: - /data/www/pifu:/app - /data/analysis:/data/analysis