This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
2022-05-17 19:48:13 +00:00
|
|
|
FROM node:14.19.2-alpine as build-deps
|
2021-04-15 04:23:22 +00:00
|
|
|
|
|
|
|
#Stage 1
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package.json yarn.lock ./
|
2021-04-24 17:54:40 +00:00
|
|
|
RUN yarn
|
2021-04-15 04:23:22 +00:00
|
|
|
COPY . ./
|
2021-11-06 08:18:57 +00:00
|
|
|
|
2022-09-25 11:33:01 +00:00
|
|
|
ENV NODE_ENV=production
|
2021-11-06 08:18:57 +00:00
|
|
|
|
2021-04-15 04:23:22 +00:00
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
#Stage 2
|
|
|
|
|
2021-07-04 16:03:50 +00:00
|
|
|
FROM nginx:1.21-alpine
|
2021-04-15 04:23:22 +00:00
|
|
|
COPY --from=build-deps /usr/src/app/build /var/www
|
2021-04-24 14:40:44 +00:00
|
|
|
COPY default.conf /etc/nginx/templates/default.conf.template
|
2021-04-15 04:23:22 +00:00
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|