Dockerfile 347 B

1234567891011121314151617
  1. FROM node:14-alpine AS build
  2. WORKDIR /opt/node_app
  3. COPY package.json yarn.lock ./
  4. RUN yarn --ignore-optional --network-timeout 600000
  5. ARG NODE_ENV=production
  6. COPY . .
  7. RUN yarn build:app:docker
  8. FROM nginx:1.21-alpine
  9. COPY --from=build /opt/node_app/build /usr/share/nginx/html
  10. HEALTHCHECK CMD wget -q -O /dev/null http://localhost || exit 1