Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM node:14-alpine as builder
- WORKDIR /app
- COPY package*.json ./
- RUN apk update \
- && apk add --no-cache --virtual .gyp python3 make g++ \
- && npm install --production
- COPY . .
- RUN mkdir -p ./public ./data \
- && cd ./client \
- && npm install --production \
- && npm run build \
- && cd .. \
- && mv ./client/build/* ./public \
- && rm -rf ./client \
- && apk del build-dependencies
- FROM node:14-alpine
- COPY --from=builder /app /app
- WORKDIR /app
- EXPOSE 5005
- ENV NODE_ENV=production
- CMD ["node", "server.js"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement