FROM python:3.12-slim

WORKDIR /app

RUN pip install --no-cache-dir flask flask-cors requests

COPY app/ ./

RUN mkdir -p /data

EXPOSE 8080

ENV PORT=8080
ENV DATA_DIR=/data
ENV OLLAMA_URL=http://192.168.0.150:11434

VOLUME ["/data"]

CMD ["python", "main.py"]
