Seo-Autopilot / Dockerfile
Nawaz-khan-droid
Add prestart.py to write credentials.json from HF secret at startup
d805e57
Raw
History Blame Contribute Delete
870 Bytes
FROM python:3.13-slim
WORKDIR /app
# Install system deps for Playwright
RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 \
libatk1.0-0 libcups2 libdrm2 libgbm1 libnss3 libnspr4 \
libu2f-udev libvulkan1 libxcomposite1 libxdamage1 libxfixes3 \
libxkbcommon0 libxrandr2 xdg-utils wget \
&& rm -rf /var/lib/apt/lists/*
# Install Python deps
COPY seo-autopilot/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN playwright install chromium --with-deps 2>/dev/null || true
# Copy application
COPY seo-autopilot/ .
# Expose FastAPI port
EXPOSE 7860
# Default: write credentials, then run FastAPI with OpenTelemetry instrumentation
CMD python prestart.py && opentelemetry-instrument uvicorn api.main:app --host 0.0.0.0 --port 7860 --workers 4