-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.backend
More file actions
32 lines (26 loc) · 798 Bytes
/
Copy pathDockerfile.backend
File metadata and controls
32 lines (26 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.11-slim
# Install system dependencies for PDF manipulation, OCR, and LibreOffice
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libreoffice \
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-spa \
tesseract-ocr-fra \
tesseract-ocr-deu \
libffi-dev \
python3-dev \
libpango-1.0-0 \
libpangoft2-1.0-0 \
libharfbuzz-subset0 \
python3-cffi \
python3-brotli \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy and install Python dependencies first (better layer caching)
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source
COPY . /app/
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]