FROM node:12 as build

WORKDIR /app
COPY keysmash/ ./

RUN npm install
RUN npm run build

FROM nginx:1.20.1-alpine

COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist/ /www/
COPY --from=build /app/static/ /www/
