File size: 526 Bytes
d382ddb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8b5a84c
 
d382ddb
 
8b5a84c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM zenika/alpine-chrome:with-playwright

WORKDIR /app

# Install Python and pip
RUN apk add --no-cache python3 py3-pip

# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy your code
COPY . .

# FastAPI and Uvicorn are already installed via requirements.txt
# Playwright browsers are already available in the base image

EXPOSE 7860

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