Skip to content

Commit 73ee8de

Browse files
refactor: update Dockerfile and add SLS issue analysis document
1 parent aa9efc8 commit 73ee8de

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

server/docker/DockerfileBuildClaude

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 基础镜像
2-
FROM --platform=linux/amd64 qimao-registry.cn-beijing.cr.aliyuncs.com/front/node:22.19
2+
FROM --platform=linux/amd64 node:22.19-alpine
33

44
# 设置默认命令
55
CMD ["/bin/sh"]
@@ -54,8 +54,7 @@ RUN npm config set registry=https://registry.npmmirror.com && \
5454
# ENV API_TIMEOUT_MS=600000
5555

5656
# 配置 Claude MCP 工具
57-
RUN claude mcp add-json lighthouse '{"command":"npx","args":["-y","qm-lighthouse-mcp@0.1.4"]}' --scope user && \
58-
claude mcp add-json larkmcp '{"command":"npx","args":["-y","@larksuiteoapi/lark-mcp","mcp","-a","cli_a751437852b01013","-s","Z4D2w1LK0ot96ebXzLEg7dH8Dkm86tvM","-l","zh","--token-mode","tenant_access_token"]}' --scope user
57+
RUN claude mcp add-json lighthouse '{"command":"npx","args":["-y","qm-lighthouse-mcp@0.1.4"]}' --scope user
5958

6059
# 创建 /root/prompt 目录并写入性能优化指南
6160
RUN mkdir -p /root/prompt

server/docker/prompt/slsnofix.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SLS 问题修复分析
2+
3+
## 任务要求
4+
5+
- 使用中文回复所有内容
6+
- 分析 SLS 日志错误,定位问题根源
7+
- 结合代码上下文,提供具体修复方案
8+
9+
## 工作流程
10+
11+
1. **查询日志** - 使用 mcp 工具查询具体的 sls 日志
12+
- 如果查询失败,尝试调用 sls_get_current_time 工具获取当前时间,并扩展查询时间为最近一个小时
13+
2. **日志分析** - 解析错误日志,识别关键错误信息(错误类型、错误堆栈、错误信息、错误原因)
14+
3. **错误分析** - 描述错误现象 + 触发场景
15+
4. **根因诊断** - 追踪代码逻辑,确定问题所在
16+
5. **方案设计** - 制定修复策略,列出受影响文件
17+
18+
## 输出格式
19+
20+
生成 JSON 报告 (`report/slsnofix.json`):
21+
22+
```json
23+
{
24+
"title": "问题简述",
25+
"error_message": "错误现象 + 触发场景",
26+
"description": "错误原因详细分析",
27+
"fix_description": "修复方案说明",
28+
"affected_files": ["文件1.js:代码行号,代码行号", "文件2.js:代码行号,代码行号"]
29+
// "suggest_code_snippet": ["建议的修改代码片段"]
30+
}
31+
```

0 commit comments

Comments
 (0)