Skip to content

Instantly share code, notes, and snippets.

@cp-sumi-k
Last active April 12, 2022 12:40
Show Gist options
  • Save cp-sumi-k/bcb45db24b41e302b86992e0a4e4acfa to your computer and use it in GitHub Desktop.
Save cp-sumi-k/bcb45db24b41e302b86992e0a4e4acfa to your computer and use it in GitHub Desktop.
FROM node:17 AS ui-build
WORKDIR /app
COPY vue-frontend/ ./
RUN npm install && npm run build
FROM node:17 AS server-build
WORKDIR /root/
COPY --from=ui-build /app/dist ./dist
COPY --from=ui-build /app/node_modules ./node_modules
COPY --from=ui-build /app/server.js /app/package*.json ./
EXPOSE 3000
CMD ["npm", "run", "serve"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment