- 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:
+30
@@ -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"]
|
||||
Reference in New Issue
Block a user