# STAGE 1
FROM node:current-alpine as build
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build

# STAGE 2
FROM nginx:stable-alpine
LABEL maintainer = "Isaac Würth, Damian Kalberer"
WORKDIR /usr/share/nginx/html
COPY --from=build /app/build .
COPY --from=build /app/.env ./.env
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
