n39librarian/Dockerfile

17 lines
No EOL
378 B
Docker

FROM node:20
RUN mkdir -p /source/middleware
RUN mkdir -p /source/frontend
COPY ../middleware /source/middleware
COPY ../frontend /source/frontend
WORKDIR /source
RUN cd frontend && npm i && npm run build
RUN cd middleware && npm i && npm run build && mkdir -p ./dist/frontend
RUN cp -r frontend/build/* middleware/dist/frontend
CMD [ "node", "middleware/dist/index.js" ]