FROM python:3.11-slim

WORKDIR /app

COPY pyproject.toml .
RUN mkdir -p src/ha_diag && touch src/ha_diag/__init__.py && \
    pip install --no-cache-dir -e .

COPY src/ src/

ENV PYTHONUNBUFFERED=1

CMD ["python", "-m", "ha_diag.main"]
