docker compose file added for deployment
This commit is contained in:
30
backend/Dockerfile
Normal file
30
backend/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# Use official lightweight Python image
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Install system dependencies
|
||||
# tesseract-ocr: for pytesseract
|
||||
# poppler-utils: for pdf2image
|
||||
# libtesseract-dev: development headers
|
||||
RUN apt-get update && apt-get install -y \
|
||||
tesseract-ocr \
|
||||
poppler-utils \
|
||||
libtesseract-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements first to leverage Docker cache
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
|
||||
# Expose port (default for Uvicorn)
|
||||
EXPOSE 8000
|
||||
|
||||
# Run the application
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Binary file not shown.
Binary file not shown.
@@ -10,3 +10,4 @@ imap-tools
|
||||
apscheduler
|
||||
python-dotenv
|
||||
pdfplumber
|
||||
pdf2image
|
||||
|
||||
Reference in New Issue
Block a user