label_deploy.logs 6.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. lq@lq:~/lq_workspace/LQLabelServer$ ./label_backend_deploy.sh
  2. [INFO] 2026-03-09 12:29:58 - 步骤 1: 进入源码目录并拉取最新代码...
  3. [INFO] 2026-03-09 12:29:58 - 检查本地是否存在可能与远程冲突的已修改文件...
  4. [INFO] 2026-03-09 12:29:58 - 本地无可能冲突的已修改文件,直接拉取远程最新代码...
  5. [WARN] 2026-03-09 12:29:58 - 未配置 upstream 远程,503 时无法切换备用源
  6. [INFO] 2026-03-09 12:29:58 - 正在执行 Git Pull (第 1 次尝试) - 强制拉取 dev 分支最新代码...
  7. [INFO] 2026-03-09 12:29:58 - 当前使用远程地址:http://WangXuMing:123456@47.109.151.80:15030/CRBC-MaaS-Platform-Project/LabelingSystem.git
  8. [INFO] 2026-03-09 12:29:58 - Git Pull 成功!当前部署提交版本:ffe82e5 - Dockerfile脚本修改
  9. [INFO] 2026-03-09 12:29:58 - 步骤 2: 关闭正在运行的容器...
  10. WARN[0000] /home/lq/lq_workspace/LQLabelServer/app/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
  11. [+] Running 1/1
  12. ✔ Container LQAdminServer Removed 1.7s
  13. [INFO] 2026-03-09 12:30:00 - 步骤 3: 查找当前运行版本并计算新版本号...
  14. [INFO] 2026-03-09 12:30:00 - 当前配置文件中的版本: v0.05
  15. [INFO] 2026-03-09 12:30:00 - 计算出的新版本号为: v0.06
  16. [INFO] 2026-03-09 12:30:00 - 步骤 4: 清理旧镜像(保留最新版本,删除上上次版本)...
  17. [INFO] 2026-03-09 12:30:00 - 发现 2 个历史镜像版本:
  18. [INFO] 2026-03-09 12:30:00 - [0] v0.05 - 08b22c4817ea (当前运行版本) - 2026-03-09 10:23:41 +0000 UTC
  19. [INFO] 2026-03-09 12:30:00 - [1] v0.04 - 08b22c4817ea - 2026-03-09 10:23:41 +0000 UTC
  20. [INFO] 2026-03-09 12:30:00 - 正在删除上上次版本镜像: v0.04 (08b22c4817ea)
  21. Untagged: lq_label_server:v0.04
  22. Untagged: lq_label_server:v0.05
  23. Deleted: sha256:08b22c4817ea03a137380629223ae0f2689495be8c2e38161b22126b87bea190
  24. [INFO] 2026-03-09 12:30:00 - 成功删除上上次版本镜像: v0.04
  25. [INFO] 2026-03-09 12:30:00 - 步骤 5: 构建新镜像 lq_label_server:v0.06 ...
  26. [+] Building 1.9s (12/12) FINISHED docker:default
  27. => [internal] load build definition from Dockerfile 0.0s
  28. => => transferring dockerfile: 1.10kB 0.0s
  29. => [internal] load metadata for docker.io/library/python:3.11-slim 1.9s
  30. => [internal] load .dockerignore 0.0s
  31. => => transferring context: 420B 0.0s
  32. => [1/7] FROM docker.io/library/python:3.11-slim@sha256:d6e4d224f70f9e0172a06a3a2eba2f768eb146811a349278b38fff3a36463b47 0.0s
  33. => [internal] load build context 0.0s
  34. => => transferring context: 2.70kB 0.0s
  35. => CACHED [2/7] WORKDIR /app 0.0s
  36. => CACHED [3/7] RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y 0.0s
  37. => CACHED [4/7] COPY requirements.txt . 0.0s
  38. => CACHED [5/7] RUN pip install --no-cache-dir -r requirements.txt 0.0s
  39. => CACHED [6/7] COPY . . 0.0s
  40. => CACHED [7/7] RUN mkdir -p /app/exports 0.0s
  41. => exporting to image 0.0s
  42. => => exporting layers 0.0s
  43. => => writing image sha256:08b22c4817ea03a137380629223ae0f2689495be8c2e38161b22126b87bea190 0.0s
  44. => => naming to docker.io/library/lq_label_server:v0.06 0.0s
  45. [INFO] 2026-03-09 12:30:02 - 镜像构建成功: lq_label_server:v0.06
  46. [INFO] 2026-03-09 12:30:02 - 步骤 6: 更新 docker-compose.yml 中的版本号...
  47. 路径:/home/lq/lq_workspace/LQLabelServer/app/docker
  48. /home/lq/lq_workspace/LQLabelServer/app/docker
  49. docker-compose.yaml
  50. [INFO] 2026-03-09 12:30:02 - 配置文件已更新: image: lq_label_server:v0.06
  51. [INFO] 2026-03-09 12:30:02 - 步骤 7: 启动 Docker Compose...
  52. WARN[0000] /home/lq/lq_workspace/LQLabelServer/app/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
  53. WARN[0000] Found orphan containers ([LQAgentServer]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
  54. [+] Running 1/1
  55. ✔ Container LQLabelServer Started 0.3s
  56. [INFO] 2026-03-09 12:30:03 - 步骤 8: 当前保留的镜像版本列表:
  57. TAG IMAGE ID SIZE CREATED AT
  58. v0.06 08b22c4817ea 385MB 2026-03-09 10:23:41 +0000 UTC
  59. [INFO] 2026-03-09 12:30:03 - ====================================================
  60. [INFO] 2026-03-09 12:30:03 - 开发版部署成功!
  61. [INFO] 2026-03-09 12:30:03 - 当前运行端口: 8003
  62. [INFO] 2026-03-09 12:30:03 - 部署版本: v0.06
  63. [INFO] 2026-03-09 12:30:03 - 保留镜像: 最新版本 + 前一个版本
  64. [INFO] 2026-03-09 12:30:03 - ====================================================