Files
lgcosta 7af7ba530d fix: make docker compose build and start the API
The image context was backend/, so COPY frontend/ failed. Build from the
repo root, place Python modules on the import path, and pin packages that
exist on PyPI. The web process no longer loads the LLM at startup.
2026-11-01 12:00:08 -03:00

29 lines
695 B
Docker

FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app/uploads /app/index /app/models /app/books
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH=/app
ENV GPT4ALL_MODEL=/app/models/llama-3.2-3b-instruct-q4_0.gguf
ENV UPLOAD_DIR=/app/uploads
ENV BOOKS_DIR=/app/books
ENV INDEX_DIR=/app/index
ENV SCHEDULES_PATH=/app/schedules.json
COPY backend/app ./app
COPY backend/templates ./templates
COPY backend/scripts ./scripts
COPY frontend ./frontend
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]