f09317f95b
- Dockerfile with Xvfb + x11vnc + noVNC for browser-in-a-URL - search.py auto-detects DISPLAY env to run headed vs headless - pause_for_human() function for CAPTCHA/login handoff - Facebook Marketplace search (headed mode only, needs login) - Updated README with both modes
29 lines
833 B
Bash
29 lines
833 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Start virtual display
|
|
export DISPLAY=:99
|
|
Xvfb :99 -screen 0 1280x720x24 -ac &
|
|
sleep 1
|
|
|
|
# Start VNC server on the virtual display (no password, listen on 5900)
|
|
x11vnc -display :99 -forever -nopw -listen 0.0.0.0 -rfbport 5900 -shared &
|
|
sleep 1
|
|
|
|
# Start noVNC web proxy (serves browser view at http://localhost:6080/vnc.html)
|
|
websockify --web=/usr/share/novnc/ 6080 localhost:5900 &
|
|
sleep 1
|
|
|
|
echo "============================================="
|
|
echo " noVNC ready: http://localhost:6080/vnc.html"
|
|
echo "============================================="
|
|
|
|
# Run whatever command was passed (or drop to shell)
|
|
if [ $# -eq 0 ]; then
|
|
echo "No command given. Container is running -- attach to use."
|
|
echo "Run searches with: docker exec car-help uv run python search.py"
|
|
tail -f /dev/null
|
|
else
|
|
exec "$@"
|
|
fi
|