问题: 构建上下文 ./backend 无法访问 ../agent, 导致容器内
/app/agent/deploy/install.sh 不存在, 返回 404
修复:
- Dockerfile 改为三阶段构建 (backend go1.21 + agent go1.24 交叉编译 + alpine runtime)
- docker-compose backend build context 改为项目根
- routes.go /agent/arch 安装命令改为动态获取 URL
- 新增 .dockerignore
- agent_install.go: SSH 远程安装 handler
- AgentWizard.tsx: 复制按钮 fallback + 动态 server URL
- ServerTableRow.tsx: agent 状态判断
验证: curl|bash 安装成功, agent 上报数据到 MySQL ✅
30 lines
312 B
Plaintext
30 lines
312 B
Plaintext
# Git
|
|
.git
|
|
.gitignore
|
|
|
|
# 前端构建产物和依赖(后端构建不需要)
|
|
frontend/node_modules
|
|
frontend/dist
|
|
frontend/.cache
|
|
|
|
# 日志
|
|
**/*.log
|
|
backend/logs/
|
|
|
|
# 敏感配置
|
|
backend/config.yaml
|
|
**/.env
|
|
|
|
# Docker 自身
|
|
docker-compose.yml
|
|
Dockerfile
|
|
**/Dockerfile
|
|
|
|
# 文档
|
|
*.md
|
|
docs/
|
|
|
|
# IDE
|
|
.idea
|
|
.vscode
|