feat: init mirror-proxy project
Build and Push to GHCR / build-and-push (push) Has been cancelled

- Docker Hub / GHCR / GitHub reverse proxy
- Web admin panel with link management
- Dynamic admin path, user and password config
- Rate limiting per link (dual/single auth mode)
- Docker and docker-compose deployment support
- GitHub Actions workflow for auto-publish to GHCR
This commit is contained in:
Agent
2026-05-24 15:27:45 +08:00
commit 9223e35164
16 changed files with 2063 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# 构建阶段
FROM golang:1.23-alpine AS builder
WORKDIR /app
COPY go.mod go.sum* ./
RUN go mod download 2>/dev/null || true
COPY . .
RUN go build -ldflags="-s -w" -o mirror-proxy ./cmd/main.go
# 运行阶段
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app
# 创建必要目录
RUN mkdir -p web/static cache
# 复制编译后的二进制文件和静态资源
COPY --from=builder /app/mirror-proxy .
COPY --from=builder /app/web/static ./web/static
# 暴露默认端口
EXPOSE 8080
VOLUME ["/app/cache"]
ENTRYPOINT ["./mirror-proxy"]