FROM python:3.11-slim WORKDIR /app # Install system dependencies for PostgreSQL and Playwright RUN apt-get update && apt-get install -y \ gcc \ libpq-dev \ # Playwright dependencies libnss3 \ libnspr4 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libdbus-1-3 \ libxkbcommon0 \ libatspi2.0-0 \ libxcomposite1 \ libxdamage1 \ libxfixes3 \ libxrandr2 \ libgbm1 \ libasound2 \ libpango-1.0-0 \ libcairo2 \ # Korean fonts for PDF capture fonts-noto-cjk \ fontconfig \ && rm -rf /var/lib/apt/lists/* \ && fc-cache -fv # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Install Playwright browsers (Chromium only for smaller image) RUN playwright install chromium # Copy application code COPY . . # Create uploads directory RUN mkdir -p /app/uploads /app/logs EXPOSE 8000 CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]