perf(cd): Web build 加速 — buildx registry cache + turbo cache mount
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
切換 docker buildx + type=registry cache (mode=max): - 比 inline cache 更可靠,deps/runner 層存入 Harbor web-cache:buildcache - 移除 BUILDKIT_INLINE_CACHE=1(不再需要) Dockerfile 補 /root/.cache/turbo mount: - Turborepo task hash 跨 build 生效,未變動 packages 直接跳過 - 配合既有 .next/cache mount,預期節省 1-2 min Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,10 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
# 2026-04-06 ogt: --mount=type=cache 持久化 .next/cache,跨 build 增量編譯
|
||||
# 只有變更的頁面重新編譯,未變更頁面直接用 cache → 節省 3-4 min
|
||||
# 2026-04-12 Claude Code: 補 turbo cache mount,Turborepo task hash 跨 build 生效
|
||||
# /root/.cache/turbo 存放 turbo 的 task 輸出快取,避免每次重跑未變動的 packages
|
||||
RUN --mount=type=cache,target=/app/apps/web/.next/cache \
|
||||
--mount=type=cache,target=/root/.cache/turbo \
|
||||
pnpm turbo build --filter=@awoooi/web
|
||||
|
||||
FROM base AS runner
|
||||
|
||||
Reference in New Issue
Block a user