Fix backend startup: launch Xvfb directly, not via xvfb-run
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 <noreply@anthropic.com>
This commit is contained in:
parent
349c795708
commit
1743590743
1 changed files with 4 additions and 2 deletions
|
|
@ -22,5 +22,7 @@ EXPOSE 8000
|
||||||
|
|
||||||
# Run under a virtual X display so Chromium launches headful (headful fingerprints
|
# Run under a virtual X display so Chromium launches headful (headful fingerprints
|
||||||
# far cleaner than headless — real GPU strings, plugins, chrome.runtime).
|
# far cleaner than headless — real GPU strings, plugins, chrome.runtime).
|
||||||
CMD ["xvfb-run", "-a", "--server-args=-screen 0 1920x1080x24", \
|
# Start Xvfb directly rather than via xvfb-run: as container PID 1, xvfb-run's
|
||||||
"uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
# 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"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue