feat: add noVNC headed mode for interactive browser sessions

- Dockerfile with Xvfb + x11vnc + noVNC for browser-in-a-URL
- search.py auto-detects DISPLAY env to run headed vs headless
- pause_for_human() function for CAPTCHA/login handoff
- Facebook Marketplace search (headed mode only, needs login)
- Updated README with both modes
This commit is contained in:
Ken
2026-05-25 06:56:21 +00:00
parent 290678635e
commit f09317f95b
4 changed files with 168 additions and 11 deletions
+29
View File
@@ -0,0 +1,29 @@
FROM python:3.13-slim
# Install display and VNC deps
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
xvfb x11vnc websockify novnc \
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
libpango-1.0-0 libcairo2 libasound2 libxshmfence1 libgtk-3-0 \
fonts-liberation && \
rm -rf /var/lib/apt/lists/*
# Install Python deps
COPY pyproject.toml uv.lock /app/
WORKDIR /app
RUN pip install uv && uv sync --frozen
# Install Playwright Chromium
RUN uv run playwright install chromium
# Copy source
COPY . /app/
# Entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 6080
ENTRYPOINT ["/entrypoint.sh"]