From 0082a60b46119d02278e61b7d2cda8df685c0e80 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Tue, 13 Oct 2026 15:14:07 +0800 Subject: [PATCH] =?UTF-8?q?chore(build):=20=E9=95=9C=E5=83=8F=E5=86=85?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=20hfb-rebate-backfill=20=E4=BB=A5=E4=BE=BF?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=89=A7=E8=A1=8C=E8=BF=94=E5=88=A9=E8=A1=A5?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补发脚本需要在生产镜像里可直接执行,与 hfb-storage-migrate 保持同一构建/拷贝方式。 --- backend/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index 9204f31..ebc0846 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -19,6 +19,10 @@ RUN --mount=type=cache,target=/go/pkg/mod \ RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.cache/go-build \ CGO_ENABLED=0 GOOS=linux go build -o /out/hfb-storage-migrate ./cmd/storage-migrate +# 一次性运维脚本:线下提号邀请返利补发(默认预演,-apply 才写库) +RUN --mount=type=cache,target=/go/pkg/mod \ + --mount=type=cache,target=/root/.cache/go-build \ + CGO_ENABLED=0 GOOS=linux go build -o /out/hfb-rebate-backfill ./cmd/rebate-backfill FROM alpine:3.22 @@ -34,6 +38,7 @@ RUN sed -i 's#https\?://dl-cdn.alpinelinux.org/alpine#https://mirrors.aliyun.com && chown app:app /app/logs COPY --from=build /out/hfb-api /app/hfb-api COPY --from=build /out/hfb-storage-migrate /app/hfb-storage-migrate +COPY --from=build /out/hfb-rebate-backfill /app/hfb-rebate-backfill COPY --from=build /go/bin/goose /app/goose COPY --from=build /src/migrations /app/migrations USER app:app