fix: agent install.sh 404 + 三阶段构建编译agent二进制

问题: 构建上下文 ./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 ✅
This commit is contained in:
Logan committed 2026-06-18 09:44:12 +08:00
1 parent d0344c2f52
commit d0b94d39c0
9 files changed
+281 -38

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
# 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