41 lines
830 B
Docker
41 lines
830 B
Docker
FROM python:3.12-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libzbar0 \
|
|
# Chromium dependencies for Playwright
|
|
libglib2.0-0t64 \
|
|
libnss3 \
|
|
libnspr4 \
|
|
libatk1.0-0t64 \
|
|
libatk-bridge2.0-0t64 \
|
|
libcups2t64 \
|
|
libdrm2 \
|
|
libexpat1 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxext6 \
|
|
libxfixes3 \
|
|
libxrandr2 \
|
|
libgbm1 \
|
|
libxkbcommon0 \
|
|
libpango-1.0-0 \
|
|
libcairo2 \
|
|
libasound2t64 \
|
|
libatspi2.0-0t64 \
|
|
fonts-liberation \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
RUN playwright install chromium
|
|
|
|
COPY app/ ./app/
|
|
|
|
RUN mkdir -p /data/uploads /data/amazon_session
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|