added react build

This commit is contained in:
2025-11-26 19:28:15 +01:00
parent 20bee1018c
commit 04c82dd9d4
3 changed files with 32 additions and 12 deletions

View File

@@ -1,12 +1,19 @@
FROM node:20-alpine
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 7002
FROM nginx:alpine AS runner
CMD ["npm", "run", "dev"]
WORKDIR /usr/share/nginx/html
COPY --from=builder /app/dist .
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]