FROM node:20-alpine AS build WORKDIR /app # The lockfile, and `npm ci`: `npm install` against package.json alone # resolved whatever the caret ranges allowed on the day of the build, so the # image could ship dependency versions CI never typechecked or tested. COPY package.json package-lock.json ./ RUN npm ci COPY . . RUN npm run build FROM nginx:alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80