28 lines
762 B
Docker
28 lines
762 B
Docker
# ---------- temel imaj ----------
|
||
FROM python:3.12-slim
|
||
|
||
# Playwright’in istediği kitaplıklar
|
||
RUN apt-get update && apt-get install -y \
|
||
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
|
||
libdrm2 libdbus-1-3 libatspi2.0-0 libx11-6 libxcomposite1 \
|
||
libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 libxcb1 \
|
||
libxkbcommon0 libpango-1.0-0 libcairo2 libasound2 \
|
||
&& rm -rf /var/lib/apt/lists/*
|
||
|
||
WORKDIR /app
|
||
|
||
# Gereksinimler
|
||
COPY requirements.txt .
|
||
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
||
# Uygulama dosyaları
|
||
COPY . .
|
||
|
||
# Playwright tarayıcılarını kur
|
||
RUN playwright install chromium
|
||
|
||
ENV PYTHONUNBUFFERED=1
|
||
EXPOSE 8000
|
||
|
||
CMD ["uvicorn", "fastapi_app:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers"]
|