Add documentation, Docker setup, and tests for server and gRPC packages

Rewrite README with project overview and quick start. Add RUNBOOK with
operational procedures and incident playbooks. Fix Dockerfile for Go 1.25
with version injection. Add docker-compose.yml. Clean up golangci.yaml
for mc-proxy. Add server tests (10) covering the full proxy pipeline with
TCP echo backends, and grpcserver tests (13) covering all admin API RPCs
with bufconn and write-through DB verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-17 11:24:35 -07:00
parent f1e9834bd3
commit e84093b7fb
8 changed files with 1688 additions and 23 deletions

View File

@@ -1,15 +1,20 @@
FROM golang:1.24-alpine AS builder
FROM golang:1.25-alpine AS builder
ARG VERSION=dev
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o mc-proxy ./cmd/mc-proxy
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" \
-o mc-proxy ./cmd/mc-proxy
FROM alpine:3.21
RUN addgroup -S mc-proxy && adduser -S mc-proxy -G mc-proxy
COPY --from=builder /build/mc-proxy /usr/local/bin/mc-proxy
USER mc-proxy
ENTRYPOINT ["mc-proxy"]
CMD ["server", "--config", "/srv/mc-proxy/mc-proxy.toml"]