From a65daba7a9e0ff1854d8704db9665d37d4735139 Mon Sep 17 00:00:00 2001 From: "n72595987@gmail.com" Date: Sun, 30 Nov 2025 00:05:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Drone=20=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=AD=A5=E9=AA=A4=E4=BD=BF=E7=94=A8=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E7=9A=84=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 Dockerfile.deploy 而非默认 Dockerfile - 直接使用 docker run 而不是 docker-compose(避免依赖问题) - 强制删除旧容器后创建新容器(确保使用新镜像) - 修复镜像构建后容器没有更新的问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6a739b8..cbf979b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -54,9 +54,9 @@ steps: port: 22 script: - cd /app/martial/frontend-build - - docker build -t martial/frontend:latest . - - cd /app/martial - - docker-compose up -d frontend + - docker build -f Dockerfile.deploy -t martial/frontend:latest . + - docker rm -f martial-frontend || true + - docker run -d --name martial-frontend --restart always -p 5173:80 --network martial_martial-network -e TZ=Asia/Shanghai martial/frontend:latest - docker ps | grep martial-frontend - echo "✅ 前端部署完成"