Advertisement
Guest User

Untitled

a guest
Nov 11th, 2021
1,006
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. FROM node:14-alpine as builder
  2.  
  3. WORKDIR /app
  4.  
  5. COPY package*.json ./
  6.  
  7. RUN apk update \
  8. && apk add --no-cache --virtual .gyp python3 make g++ \
  9. && npm install --production
  10.  
  11. COPY . .
  12.  
  13. RUN mkdir -p ./public ./data \
  14. && cd ./client \
  15. && npm install --production \
  16. && npm run build \
  17. && cd .. \
  18. && mv ./client/build/* ./public \
  19. && rm -rf ./client \
  20. && apk del build-dependencies
  21.  
  22. FROM node:14-alpine
  23.  
  24. COPY --from=builder /app /app
  25.  
  26. WORKDIR /app
  27.  
  28. EXPOSE 5005
  29.  
  30. ENV NODE_ENV=production
  31.  
  32. CMD ["node", "server.js"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement