fix: 修复 Drone 部署步骤使用正确的 Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
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:
@@ -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 "✅ 前端部署完成"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user