FROM python:3.11-slim # Install system dependencies for WeasyPrint and fonts RUN apt-get update && apt-get install -y \ python3-pip \ python3-cffi \ python3-brotli \ libpango-1.0-0 \ libharfbuzz0b \ libpangoft2-1.0-0 \ libpangocairo-1.0-0 \ libcairo2 \ libgdk-pixbuf-2.0-0 \ libffi-dev \ shared-mime-info \ fonts-dejavu \ fonts-liberation \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Copy requirements COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Install specific packages for Auditor RUN pip install --no-cache-dir imap-tools weasyprint fpdf2 pymupdf requests python-dotenv # Copy application code COPY . . # Ensure scripts are executable RUN chmod +x export_emails_v2.py scheduler.py # Run the scheduler CMD ["python3", "scheduler.py"]