chore: add a manual workflow for offline npm caches
Frontend CI / unit (test, type-check, build) (push) Successful in 2m35s
Frontend CI / browser E2E (frontend + pinned backend) (push) Successful in 9m54s

CI can download Linux dependencies so the server can build images without npm.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-25 12:52:27 +03:30
co-authored by Cursor
parent c53a67831d
commit a5a4d79a32
4 changed files with 266 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1
# Offline frontend image. Build context is the frontend source tree
# plus ./offline-npm-cache. nginx.conf must be in that context.
FROM node:22.18.0-bookworm AS build
WORKDIR /app
ARG VITE_API_URL=/api
ENV VITE_API_URL=${VITE_API_URL}
COPY offline-npm-cache /offline-npm-cache
COPY package.json package-lock.json ./
RUN npm ci --offline --cache /offline-npm-cache --no-audit --no-fund \
&& rm -rf /offline-npm-cache /root/.npm
COPY . .
RUN npm run build
FROM nginx:1.27-alpine AS production
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]