2020-11-07 23:22:19 +01:00
|
|
|
FROM node:14-alpine AS build
|
2020-04-29 07:53:07 +02:00
|
|
|
|
2020-06-18 11:46:24 +02:00
|
|
|
WORKDIR /opt/node_app
|
|
|
|
|
2021-02-20 13:47:17 +01:00
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn --ignore-optional
|
2020-06-18 11:46:24 +02:00
|
|
|
|
|
|
|
ARG NODE_ENV=production
|
|
|
|
|
2020-11-07 23:22:19 +01:00
|
|
|
COPY . .
|
2021-02-20 13:47:17 +01:00
|
|
|
RUN yarn build:app:docker
|
2020-04-29 07:53:07 +02:00
|
|
|
|
2021-07-09 17:07:34 +02:00
|
|
|
FROM nginx:1.21-alpine
|
2020-04-29 07:53:07 +02:00
|
|
|
|
2020-06-18 11:46:24 +02:00
|
|
|
COPY --from=build /opt/node_app/build /usr/share/nginx/html
|
2020-04-29 07:53:07 +02:00
|
|
|
|
|
|
|
HEALTHCHECK CMD wget -q -O /dev/null http://localhost || exit 1
|