From 1743590743ada4d643febd40143cb9ce226b6b26 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Sun, 5 Jul 2026 16:35:03 +0000 Subject: [PATCH] Fix backend startup: launch Xvfb directly, not via xvfb-run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xvfb-run as container PID 1 hangs before exec'ing uvicorn — its Xvfb readiness handshake (SIGUSR1) is never delivered to PID 1, so the backend sat 'Up (unhealthy)' with no logs and the frontend never started. Co-Authored-By: Claude Fable 5 --- backend/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 093c7e1..e8aea32 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -22,5 +22,7 @@ EXPOSE 8000 # Run under a virtual X display so Chromium launches headful (headful fingerprints # far cleaner than headless — real GPU strings, plugins, chrome.runtime). -CMD ["xvfb-run", "-a", "--server-args=-screen 0 1920x1080x24", \ - "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] +# Start Xvfb directly rather than via xvfb-run: as container PID 1, xvfb-run's +# SIGUSR1 readiness handshake never fires and it hangs without exec'ing the app. +ENV DISPLAY=:99 +CMD ["/bin/sh", "-c", "Xvfb :99 -screen 0 1920x1080x24 -nolisten tcp & sleep 1; exec uvicorn main:app --host 0.0.0.0 --port 8000"]