# Use official Python image FROM python:3.11-slim # Set work directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ libglib2.0-0 \ libnss3 \ libfontconfig1 \ libxss1 \ libasound2 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libxcomposite1 \ libxdamage1 \ libxrandr2 \ libgbm1 \ wget \ && rm -rf /var/lib/apt/lists/* # Copy project files COPY . /app # Install Python dependencies RUN pip install --upgrade pip && \ pip install --no-cache-dir . && \ pip install --no-cache-dir fastapi uvicorn[standard] patchright markdownify beautifulsoup4 readability-lxml ddgs # Expose port EXPOSE 8000 # Run the FastAPI server CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]