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.
2021-10-13 02:12:22 +00:00
|
|
|
FROM node:14.18.1-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 . ./
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
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;"]
|