25 lines
624 B
Docker
25 lines
624 B
Docker
FROM python:3.12-slim AS backend
|
|
|
|
# System dependencies: fonts for PDF export + fontconfig
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
fonts-liberation \
|
|
fontconfig && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
fc-cache -fv
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python dependencies
|
|
COPY pyproject.toml ./
|
|
RUN pip install --no-cache-dir -e ".[dev]"
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Create data directories (will be overridden by volume mounts)
|
|
RUN mkdir -p /data/pdfs /data/thumbnails /data/db
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
|