fix: 修复 Drone 部署步骤使用正确的 Dockerfile

- 使用 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:
Z-WICK
2025-11-30 00:05:01 +08:00
parent 60b4144276
commit f4bb887d5c
+3 -3
View File
@@ -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 "✅ 前端部署完成"