From dc8a49bb04597a825fcb6965e2ba61ecc726afc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sj=C3=B6borg?= Date: Tue, 16 Sep 2025 09:38:03 +0200 Subject: [PATCH] fix: add xvfb to docker image to enable playwright headed crawls --- Dockerfile | 6 +++++- deploy/docker/supervisord.conf | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1267578c5..154310ad1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,8 @@ ENV PYTHONFAULTHANDLER=1 \ PIP_DEFAULT_TIMEOUT=100 \ DEBIAN_FRONTEND=noninteractive \ REDIS_HOST=localhost \ - REDIS_PORT=6379 + REDIS_PORT=6379 \ + DISPLAY=:99 ARG PYTHON_VERSION=3.12 ARG INSTALL_TYPE=default @@ -68,6 +69,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libcairo2 \ libasound2 \ libatspi2.0-0 \ + xvfb \ + xauth \ + x11-utils \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/deploy/docker/supervisord.conf b/deploy/docker/supervisord.conf index a1b994aa2..11ab621fa 100644 --- a/deploy/docker/supervisord.conf +++ b/deploy/docker/supervisord.conf @@ -25,4 +25,14 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr ; Redirect gunicorn stderr to container stderr stderr_logfile_maxbytes=0 +[program:xvfb] +command=Xvfb :99 -screen 0 1920x1080x24 -ac +extension GLX +render -noreset +user=appuser +autorestart=true +priority=5 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + # Optional: Add filebeat or other logging agents here if needed \ No newline at end of file