FROM python:3.12.4 as build

WORKDIR /app
COPY . .
RUN pip install poetry && poetry build

FROM python:3.12.4

COPY --from=build /app/dist /tmp/dist
RUN pip install /tmp/dist/*.whl && rm -rf /tmp/dist

CMD ["divent"]