26 lines
786 B
Docker
26 lines
786 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies, including Rust and build tools
|
|
RUN apt-get update && apt-get install -y \
|
|
libreoffice poppler-utils ffmpeg \
|
|
libffi-dev libssl-dev g++ curl libjpeg-dev zlib1g-dev \
|
|
libxml2-dev libxslt-dev build-essential cargo \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Debug: Verify Rust installation
|
|
RUN rustc --version && cargo --version
|
|
|
|
# Copy application files
|
|
COPY . /app
|
|
|
|
# Upgrade pip and install Python dependencies (using piwheels for ARM)
|
|
RUN python -m pip install --upgrade pip && \
|
|
pip install --no-cache-dir --extra-index-url https://www.piwheels.org/simple -r requirements.txt
|
|
|
|
# Expose the application port
|
|
EXPOSE 5000
|
|
|
|
# Start the application
|
|
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"] |