FROM node:16-alpine AS builder

COPY ./ /home/node/app
WORKDIR /home/node/app

RUN npm ci && npm run build


FROM nginx:alpine

COPY ./nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /home/node/app/dist /var/www/html

EXPOSE 8080