fix: 修复 Drone 部署步骤使用正确的 Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing

- 使用 Dockerfile.deploy 而非默认 Dockerfile
- 直接使用 docker run 而不是 docker-compose(避免依赖问题)
- 强制删除旧容器后创建新容器(确保使用新镜像)
- 修复镜像构建后容器没有更新的问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
n72595987@gmail.com
2025-11-30 00:05:01 +08:00
parent 134208d510
commit a65daba7a9

View File

@@ -54,9 +54,9 @@ steps:
port: 22 port: 22
script: script:
- cd /app/martial/frontend-build - cd /app/martial/frontend-build
- docker build -t martial/frontend:latest . - docker build -f Dockerfile.deploy -t martial/frontend:latest .
- cd /app/martial - docker rm -f martial-frontend || true
- docker-compose up -d frontend - 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 - docker ps | grep martial-frontend
- echo "✅ 前端部署完成" - echo "✅ 前端部署完成"