Skip to content

Commit 06506ee

Browse files
authored
Merge pull request #1316 from zhuanyongxigua/codex/mcp-readonly-multi-instance
feat(mcp): add read-only multi-instance server
2 parents 43a361d + c18b2c9 commit 06506ee

37 files changed

Lines changed: 2395 additions & 1416 deletions

‎mcp_server/.dockerignore‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.git
2+
.gitignore
3+
secrets/
4+
state/
5+
*.log
6+
mcp-server
7+
coverage.out

‎mcp_server/.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/secrets/
2+
/state/
3+
/mcp-server
4+
*.log
5+
coverage.out

‎mcp_server/Dockerfile‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
FROM golang:1.24-alpine AS builder
1+
FROM golang:1.25.14-alpine3.23 AS builder
22

3-
WORKDIR /app
3+
ARG GOPROXY
4+
5+
WORKDIR /src
46

57
RUN apk add --no-cache git
68

79
COPY go.mod go.sum ./
8-
910
RUN go mod download
1011

1112
COPY . .
13+
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/mcp-server .
1214

13-
RUN CGO_ENABLED=0 go build -o mcp-server .
14-
15-
FROM alpine:latest
16-
17-
WORKDIR /app
15+
FROM alpine:3.22
1816

19-
RUN apk add --no-cache ca-certificates tzdata
17+
RUN apk add --no-cache ca-certificates tzdata \
18+
&& install -d -m 700 /var/lib/safeline-mcp \
19+
&& install -d -m 755 /etc/safeline-mcp
2020

21-
COPY --from=builder /app/mcp-server .
22-
COPY --from=builder /app/config.yaml .
21+
COPY --from=builder /out/mcp-server /app/mcp-server
22+
COPY config.yaml /etc/safeline-mcp/config.yaml
2323

2424
ENV TZ=Asia/Shanghai
2525

2626
EXPOSE 5678
2727

28-
CMD ["./mcp-server"]
28+
ENTRYPOINT ["/app/mcp-server"]
29+
CMD ["--config", "/etc/safeline-mcp/config.yaml"]

0 commit comments

Comments
 (0)