# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN yarn install
COPY . .
RUN yarn build

# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html

# setting timezone
RUN apk add --no-cache tzdata
ENV TZ=Europe/Zurich

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