FROM node:18.8 as build-deps

WORKDIR /app/client
COPY client/package.json ./
COPY client/package-lock.json ./
COPY client/rollup.config.js ./
COPY client/src ./src/
RUN npm install
RUN npm run build


FROM python:latest
ENV TZ Europe/Zurich

WORKDIR /app/news_check

COPY requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt

COPY client/public/index.html client/public/index.html
COPY --from=build-deps /app/client/public client/public/
COPY server server/

WORKDIR /app/news_check/server
# CMD python app.py