修复 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>
This commit is contained in:
yangzhaohan
2026-07-06 10:47:31 +08:00
parent 093511bbdd
commit 843024d7da
6 changed files with 13 additions and 8 deletions
+3
View File
@@ -6,7 +6,10 @@ services:
image: ops-mcp:latest
container_name: ops-mcp
restart: unless-stopped
ports:
- "${OPS_MCP_PORT:-9090}:${OPS_MCP_PORT:-9090}"
environment:
- OPS_MCP_TRANSPORT=sse
- OPS_MCP_ADDR=:${OPS_MCP_PORT:-9090}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro