FROM node:lts-alpine AS builder

WORKDIR /app

RUN npm install -g @angular/cli

COPY app/package*.json ./
RUN npm install

COPY app/ .

RUN npm run build --prod

FROM nginx:alpine
COPY nginx.prod.conf /etc/nginx/nginx.conf

COPY --from=builder /app/dist/app/fr/ /usr/share/nginx/html/
