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
|
|
|
|
|
2021-02-20 14:47:17 +02:00
|
|
|
COPY package.json yarn.lock ./
|
2023-02-07 14:14:31 +08:00
|
|
|
RUN yarn --ignore-optional --network-timeout 600000
|
2020-06-18 10:46:24 +01:00
|
|
|
|
|
|
|
ARG NODE_ENV=production
|
|
|
|
|
2020-11-07 23:22:19 +01:00
|
|
|
COPY . .
|
2021-02-20 14:47:17 +02:00
|
|
|
RUN yarn build:app:docker
|
2020-04-29 08:53:07 +03:00
|
|
|
|
2021-07-09 18:07:34 +03:00
|
|
|
FROM nginx:1.21-alpine
|
2020-04-29 08:53:07 +03:00
|
|
|
|
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
|