added Dockerfile

This commit is contained in:
2022-12-22 23:04:53 -03:00
parent 6b2c17777c
commit a980569769

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM alpine:latest as build
RUN apk add --update nodejs npm
RUN npm install --global yarn
COPY ['.', '/usr/src']
WORKDIR /usr/src
RUN yarn
RUN yarn build REACT_APP_ENV_MODE=${REACT_APP_ENV_MODE}
FROM nginx:1.23.1-alpine
EXPOSE 80
COPY ./docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/src/build /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]