perf(files): 优化私有文件鉴权与高成本查询隔离

This commit is contained in:
yml
2026-11-20 20:12:00 +08:00
parent e01a01c1aa
commit 9d542af51f
26 changed files with 2068 additions and 42 deletions
+5
View File
@@ -27,6 +27,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-pickup-points-backfill ./cmd/pickup-points-backfill
# 一次性运维脚本:回填私有文件对象绑定(默认预演,-dry-run=false 才写库)
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-file-object-bindings-backfill ./cmd/file-object-bindings-backfill
FROM alpine:3.22
@@ -44,6 +48,7 @@ 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 /out/hfb-pickup-points-backfill /app/hfb-pickup-points-backfill
COPY --from=build /out/hfb-file-object-bindings-backfill /app/hfb-file-object-bindings-backfill
COPY --from=build /go/bin/goose /app/goose
COPY --from=build /src/migrations /app/migrations
USER app:app