13 lines
280 B
Docker
13 lines
280 B
Docker
# --- Build stage ---
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# --- Serve stage ---
|
|
FROM nginx:alpine
|
|
WORKDIR /usr/share/nginx/html/
|
|
COPY --from=build /app/dist .
|
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|