26 lines
405 B
Docker
26 lines
405 B
Docker
FROM node:14-alpine as builder
|
|
|
|
ENV NODE_ENV=production
|
|
ENV REACT_APP_CRM=prod
|
|
ENV GENERATE_SOURCEMAP=false
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json /app/
|
|
|
|
RUN npm install --only=prod
|
|
|
|
COPY . /app
|
|
|
|
RUN npm run build
|
|
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /app/build /usr/share/nginx/html
|
|
|
|
COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 3000
|
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"] |