2020-11-07 23:22:19 +01:00
|
|
|
FROM node:14-alpine AS build
|
2020-04-29 08:53:07 +03:00
|
|
|
|
2020-06-18 10:46:24 +01:00
|
|
|
WORKDIR /opt/node_app
|
|
|
|
|
2020-04-29 08:53:07 +03:00
|
|
|
COPY package.json package-lock.json ./
|
2020-11-07 23:22:19 +01:00
|
|
|
RUN npm i --no-optional
|
2020-06-18 10:46:24 +01:00
|
|
|
|
2020-11-07 23:22:19 +01:00
|
|
|
ARG REACT_APP_INCLUDE_GTAG=false
|
2020-06-18 10:46:24 +01:00
|
|
|
ARG NODE_ENV=production
|
|
|
|
|
2020-11-07 23:22:19 +01:00
|
|
|
COPY . .
|
2020-06-18 12:18:57 +01:00
|
|
|
RUN npm run build:app:docker
|
2020-04-29 08:53:07 +03:00
|
|
|
|
|
|
|
FROM nginx:1.17-alpine
|
|
|
|
|
2020-06-18 10:46:24 +01:00
|
|
|
COPY --from=build /opt/node_app/build /usr/share/nginx/html
|
2020-04-29 08:53:07 +03:00
|
|
|
|
|
|
|
HEALTHCHECK CMD wget -q -O /dev/null http://localhost || exit 1
|