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.
admin-panel/Dockerfile

19 lines
377 B
Docker
Raw Normal View History

2021-04-24 06:13:29 +00:00
FROM node:14.16.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:40:06 +00:00
RUN yarn install --frozen-lockfile
2021-04-15 04:23:22 +00:00
COPY . ./
ENV NODE_ENV=production
RUN yarn build
#Stage 2
2021-04-24 06:13:29 +00:00
FROM nginx:1.20-alpine
2021-04-15 04:23:22 +00:00
COPY --from=build-deps /usr/src/app/build /var/www
COPY default.conf /etc/nginx/templates/default.conf.template
2021-04-15 04:23:22 +00:00
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]