Revert to headed Chrome + Xvfb; add shm_size 256m to fix Xvfb in Docker

Headless mode gets blocked by Cloudflare on the search endpoint. Headed
mode with Xvfb works on dev (Unraid). The missing piece on Proxmox LXC was
insufficient /dev/shm (Docker default 64 MB); setting shm_size: 256m gives
Xvfb enough shared memory to start.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-09 17:36:27 +00:00
parent e53c482141
commit 3c4bc633fe
3 changed files with 9 additions and 9 deletions

View file

@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \
libpq-dev \
postgresql-client \
curl \
xvfb \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
@ -19,4 +20,6 @@ COPY . .
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
ENV DISPLAY=:99
CMD ["sh", "-c", "Xvfb :99 -screen 0 1280x720x24 -nolisten tcp & sleep 1 && uvicorn main:app --host 0.0.0.0 --port 8000"]