FROM python:3.12

RUN pip install "poetry<3.0.0"
RUN poetry config system-git-client true
RUN poetry config virtualenvs.create false

WORKDIR /app

COPY pyproject.toml ./
COPY poetry.lock ./poetry.lock
RUN poetry install --no-root

COPY app ./app
COPY core ./core
COPY app_info.py main.py settings.py ./

CMD uvicorn main:app --host 0.0.0.0 --port 8000 --reload