File size: 990 Bytes
5054b40
d4063d8
 
 
5054b40
bf81d86
 
93ec89a
38612e0
93ec89a
2bd7c3c
38612e0
93ec89a
 
38612e0
 
5054b40
8da7419
 
d4063d8
5054b40
839a1a4
38612e0
 
5054b40
8da7419
d4063d8
2a21b57
 
 
8da7419
2a21b57
 
38612e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM python:3.11-slim

WORKDIR /app

# Upgrade pip
RUN pip install --upgrade pip

# Install system dependencies for Playwright + fonts
RUN apt-get update && apt-get install -y \
    wget gnupg ca-certificates curl unzip \
    libxkbcommon0 libnss3 libatk1.0-0 libatk-bridge2.0-0 \
    libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 \
    libasound2 libxshmfence1 libxext6 libxfixes3 libdrm2 \
    fonts-liberation libappindicator3-1 libnspr4 libx11-xcb1 libxrender1 \
    && rm -rf /var/lib/apt/lists/*

# Copy dependencies and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Playwright + Chromium
RUN pip install --no-cache-dir playwright
RUN playwright install --with-deps chromium

# Copy app
COPY . .

# --- 🔧 Force rebuild marker (prevents EOF caching issue)
RUN echo "Rebuild timestamp: $(date)" > /rebuild_marker.txt

EXPOSE 7860

# Run the FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]