feat(frontend): add React UI — procurement office, wizard, suppliers, inventory panel (dash port), role-based login
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Frontend image — multi-stage build
|
||||
# Stage 1: build the Vite app with Node.js
|
||||
# Stage 2: serve static files with nginx (which also proxies /api -> api:8000)
|
||||
|
||||
FROM node:22-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Dependencies first (layer caching)
|
||||
# NPM_REGISTRY overridable; default points at npmmirror because
|
||||
# registry.npmjs.org is unreachable from this network.
|
||||
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm config set registry ${NPM_REGISTRY} && npm ci
|
||||
|
||||
# Source code + build
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# ---------- runtime ----------
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user