build: fail fast on stalled npm fetches in the image build
All checks were successful
/ checks (push) Successful in 37s
/ deploy (push) Successful in 8s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nholtware 2026-11-05 02:36:32 -06:00
parent 96759e821a
commit fc7ebd5798

View file

@ -2,7 +2,8 @@
FROM node:22.23.4-alpine AS build FROM node:22.23.4-alpine AS build
WORKDIR /app WORKDIR /app
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN npm ci # Fail fast and retry on a stalled registry fetch (npm defaults can hang ~10 min).
RUN npm ci --fetch-timeout=60000 --fetch-retries=5 --fetch-retry-mintimeout=2000 --no-audit --no-fund
COPY . . COPY . .
ARG GIT_SHA=dev ARG GIT_SHA=dev
ENV VITE_GIT_SHA=${GIT_SHA} ENV VITE_GIT_SHA=${GIT_SHA}