yangzhaohan
|
843024d7da
|
修复 Docker 构建 + 端口可配置
- Dockerfile 设置 GOPROXY=https://goproxy.cn,direct 解决国内网络问题
- 新增 addr 配置项,支持自定义端口,默认 :8080
- docker-compose 端口改为 ${OPS_MCP_PORT:-9090}
- 移除 EXPOSE 指令(端口通过 compose 管理)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-07-06 10:47:31 +08:00 |
|
yangzhaohan
|
093511bbdd
|
精简项目:只保留 docker_logs + health + info 三个工具
- 移除 database/middleware 等复杂模块,先聚焦核心功能
- docker_logs:封装 docker logs --tail N <container>
- 修复 go.mod 版本为 1.24 匹配 Docker 构建镜像
- Dockerfile 改用 alpine + docker-cli,避免 scratch 无 shell 问题
- docker-compose.yml 简化为单服务定义
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-07-06 10:42:23 +08:00 |
|
yangzhaohan
|
fb2c3a6cae
|
Go MCP Server 项目初始化:工具注册架构 + 编译运行通过
- Tool 接口 + Registry 注册中心,工具模块化插拔
- system 工具:health / info
- database 工具:db_query / db_tables / db_table_info / db_explain(四层 SQL 安全)
- docker 工具:docker_ps / docker_logs / docker_inspect(白名单 + 大小限制)
- middleware:auth(JWT+APIKey)/ ratelimit(令牌桶)/ audit(slog 结构化)
- stdio / SSE 双传输模式,Viper 多环境配置
- Dockerfile 多阶段构建(golang:alpine → scratch),~15MB 镜像
- docker-compose.yml 一键部署 + 安全加固(read_only / no-new-privileges / cap_drop)
- go build ./... / go vet ./... / go test ./... 全部通过
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-07-06 10:26:52 +08:00 |
|