Files
Tron.io/Dockerfile
2020-11-02 15:15:48 +01:00

20 lines
470 B
Docker

# https://medium.com/bb-tutorials-and-thoughts/packaging-your-vue-js-app-with-nodejs-backend-for-production-83abe213532c
FROM node:10 AS ui-build
WORKDIR /usr/src/app
COPY client/ ./client/
RUN cd client && npm install && npm run build
FROM node:10 AS server-build
WORKDIR /root/
COPY --from=ui-build /usr/src/app/client/dist ./server/dist
COPY server/package*.json ./server/
RUN cd server && npm install
COPY server/src ./server/
EXPOSE 3000
CMD ["npm", "start"]