16 lines
451 B
Docker
16 lines
451 B
Docker
FROM node:latest AS client-build
|
|
WORKDIR /usr/src/app
|
|
COPY client/ ./client/
|
|
RUN cd client && npm install && npm run build
|
|
|
|
FROM node:latest AS server-build
|
|
WORKDIR /usr/src/app
|
|
COPY server/ ./server/
|
|
RUN cd server && npm install && npm run build
|
|
|
|
FROM node:latest AS serve
|
|
WORKDIR /root/
|
|
COPY --from=server-build /usr/src/app/server/dist ./distServer
|
|
COPY --from=client-build /usr/src/app/client/dist ./distClient
|
|
CMD ["node", "./distServer/app.js"]
|