Files
gold_land_user/offline/frontend.Dockerfile
T
safavimohadeseh78andCursor a5a4d79a32
Frontend CI / unit (test, type-check, build) (push) Successful in 2m35s
Frontend CI / browser E2E (frontend + pinned backend) (push) Successful in 9m54s
chore: add a manual workflow for offline npm caches
CI can download Linux dependencies so the server can build images without npm.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-25 12:52:27 +03:30

30 lines
678 B
Docker

# 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;"]