ci: keep npm and Next compile caches across image builds
CI / Lint e auditorias (push) Successful in 45s
CI / Trivy (dependências e segredos) (push) Successful in 8s
CI / Imagem Docker (linux/arm64) (push) Successful in 4m11s
Release / Plano (reaproveitar a imagem?) (push) Successful in 5s
Release / ci (push) Skipped
Release / Publica a imagem (linux/arm64) (push) Successful in 2m40s
Release / Cria a release no Gitea (push) Skipped
CI / Lint e auditorias (push) Successful in 45s
CI / Trivy (dependências e segredos) (push) Successful in 8s
CI / Imagem Docker (linux/arm64) (push) Successful in 4m11s
Release / Plano (reaproveitar a imagem?) (push) Successful in 5s
Release / ci (push) Skipped
Release / Publica a imagem (linux/arm64) (push) Successful in 2m40s
Release / Cria a release no Gitea (push) Skipped
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ad130a334
commit
f6e10a293a
2 files changed
+8
-13
No files matched your search
+4
-2
@@ -6,14 +6,16 @@ WORKDIR /app
|
||||
# O Puppeteer só é usado em scripts locais (slides, capturas): não baixa o Chrome.
|
||||
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
# Cache do npm no daemon: dependências já baixadas não vão à rede de novo.
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci
|
||||
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
ENV NEXT_TELEMETRY_DISABLED=1 NEXT_OUTPUT=standalone
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
# Cache de compilação do Next: só as páginas que mudaram são recompiladas.
|
||||
RUN --mount=type=cache,target=/app/.next/cache npm run build
|
||||
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
|
||||
Reference in new issue
Block a user