chore: sync

This commit is contained in:
2026-03-18 22:06:43 +08:00
parent e89678e61a
commit 0c4380c3c3
45 changed files with 5883 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
FROM golang:1.20-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/sproutgate-backend .
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
ENV PORT=8080
ENV DATA_DIR=/data
COPY --from=builder /out/sproutgate-backend /usr/local/bin/sproutgate-backend
COPY API_DOCS.md /app/API_DOCS.md
EXPOSE 8080
VOLUME ["/data"]
ENTRYPOINT ["sproutgate-backend"]