# Build react App
FROM node:current-alpine as build
RUN mkdir /app
WORKDIR /app
COPY ./src/ /app
RUN npm install
RUN npm run build

# Run react App
FROM nginx:stable-alpine

# COPY ./build /var/www
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/build /var/www

EXPOSE 80
ENTRYPOINT ["nginx","-g","daemon off;"]
