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"]