16 lines
428 B
Docker
16 lines
428 B
Docker
|
|
# ---- Build stage ----
|
||
|
|
FROM node:20-alpine AS builder
|
||
|
|
WORKDIR /app
|
||
|
|
RUN apk add --no-cache python3 make g++
|
||
|
|
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* ./
|
||
|
|
RUN npm ci --legacy-peer-deps
|
||
|
|
COPY . .
|
||
|
|
RUN npm run build
|
||
|
|
|
||
|
|
# ---- Run stage (nginx) ----
|
||
|
|
FROM nginx:alpine
|
||
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||
|
|
EXPOSE 10502
|
||
|
|
CMD ["nginx", "-g", "daemon off;"]
|