Переглянути джерело

-dev:修改了端口号并发布

LuoChinWen 4 тижнів тому
батько
коміт
0dd07ce317

+ 3 - 3
backend/Dockerfile

@@ -23,9 +23,9 @@ COPY . .
 
 RUN mkdir -p /app/data
 
-EXPOSE 8002
+EXPOSE 8003
 
 HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
-    CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8002/health')" || exit 1
+    CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8003/health')" || exit 1
 
-CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8002"]
+CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8003"]

+ 1 - 1
backend/config.docker.yaml

@@ -39,5 +39,5 @@ database:
 # 服务器配置
 server:
   host: "0.0.0.0"
-  port: 8002
+  port: 8003
   reload: false  # 生产环境关闭热重载

+ 1 - 1
backend/config.yaml

@@ -38,5 +38,5 @@ database:
 # 服务器配置
 server:
   host: "0.0.0.0"
-  port: 8002
+  port: 8003
   reload: true

+ 2 - 2
backend/docker-compose.yml

@@ -8,7 +8,7 @@ services:
       dockerfile: Dockerfile
     container_name: lq-label-backend
     ports:
-      - "8002:8002"
+      - "8003:8003"
     volumes:
       # 持久化数据库文件
       - ./data:/app/data
@@ -18,7 +18,7 @@ services:
       - DATABASE_PATH=/app/data/annotation_platform.db
     restart: unless-stopped
     healthcheck:
-      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8002/health')"]
+      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8003/health')"]
       interval: 30s
       timeout: 10s
       retries: 3

+ 1 - 1
backend/main.py

@@ -71,4 +71,4 @@ async def health_check():
 
 if __name__ == "__main__":
     import uvicorn
-    uvicorn.run(app, host="0.0.0.0", port=8002)
+    uvicorn.run(app, host="0.0.0.0", port=8003)

+ 2 - 2
backend/scripts/docker-start.bat

@@ -26,8 +26,8 @@ if %ERRORLEVEL% NEQ 0 (
 if %ERRORLEVEL% EQU 0 (
     echo.
     echo 服务启动完成!
-    echo API 地址: http://localhost:8002
-    echo 健康检查: http://localhost:8002/health
+    echo API 地址: http://localhost:8003
+    echo 健康检查: http://localhost:8003/health
     echo.
     echo 常用命令:
     echo   查看日志: docker-compose logs -f

+ 2 - 2
backend/scripts/docker-start.sh

@@ -32,8 +32,8 @@ echo -e "${GREEN}启动 Docker 服务...${NC}"
 docker-compose up -d
 
 echo -e "${GREEN}服务启动完成!${NC}"
-echo -e "API 地址: http://localhost:8002"
-echo -e "健康检查: http://localhost:8002/health"
+echo -e "API 地址: http://localhost:8003"
+echo -e "健康检查: http://localhost:8003/health"
 echo ""
 echo -e "${YELLOW}常用命令:${NC}"
 echo "  查看日志: docker-compose logs -f"

+ 1 - 1
backend/test_oauth_flow.py

@@ -5,7 +5,7 @@
 import requests
 import json
 
-BASE_URL = "http://localhost:8002"
+BASE_URL = "http://localhost:8003"
 
 def test_oauth_status():
     """测试 OAuth 状态端点"""

+ 3 - 3
deploy.sh

@@ -98,7 +98,7 @@ echo "等待服务启动..."
 sleep 5
 
 # 健康检查
-if curl -s http://localhost:8002/health > /dev/null; then
+if curl -s http://localhost:8003/health > /dev/null; then
     echo -e "${GREEN}后端服务启动成功${NC}"
 else
     echo -e "${RED}后端服务启动失败,请检查日志: docker compose logs${NC}"
@@ -166,8 +166,8 @@ echo -e "${GREEN}  部署完成!${NC}"
 echo -e "${GREEN}============================================${NC}"
 echo
 echo "前端地址: http://localhost (根据 Nginx 配置)"
-echo "后端地址: http://localhost:8002"
-echo "API 文档: http://localhost:8002/docs"
+echo "后端地址: http://localhost:8003"
+echo "API 文档: http://localhost:8003/docs"
 echo
 echo -e "${YELLOW}常用命令:${NC}"
 echo "  查看后端日志: cd backend && docker compose logs -f"

BIN
lq_label_dist.tar.gz


+ 1 - 1
web/apps/lq_label/nginx.conf

@@ -23,7 +23,7 @@ server {
 
     # API 代理到后端
     location /api/ {
-        proxy_pass http://localhost:8002/;
+        proxy_pass http://localhost:8003/;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

+ 1 - 1
web/apps/lq_label/src/services/api.ts

@@ -14,7 +14,7 @@ import { toast } from './toast';
 /**
  * API base URL - defaults to localhost:8002 for development
  */
-const API_BASE_URL = process.env.NX_API_BASE_URL || 'http://localhost:8002';
+const API_BASE_URL = process.env.NX_API_BASE_URL || 'http://localhost:8003';
 
 /**
  * Axios instance with default configuration