feat: car-help web UI with browser view, search API, and buying guide
- FastAPI backend on port 8080 with noVNC proxy for same-origin iframe - Split-panel UI: live browser (55%) + search/guide/saved tabs (45%) - Car buying guide: target models, pre-purchase checklist, mechanics nearby, negotiation tips, budget breakdown - Scoring/ranking engine for listings (Toyota Prius = highest) - Docker container runs Xvfb + x11vnc + noVNC + FastAPI together - Accessible at browser.ampbox.io via cloudflared tunnel
This commit is contained in:
Regular → Executable
+9
-8
@@ -1,27 +1,28 @@
|
||||
#!/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 &
|
||||
x11vnc -display :99 -forever -nopw -listen 0.0.0.0 -rfbport 5900 -shared 2>/dev/null &
|
||||
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 "noVNC ready on :6080"
|
||||
|
||||
# Start FastAPI -- use uv run from /app
|
||||
cd /app
|
||||
uv run python -m uvicorn app:app --host 0.0.0.0 --port 8080 --log-level info &
|
||||
sleep 2
|
||||
|
||||
echo "============================================="
|
||||
echo " noVNC ready: http://localhost:6080/vnc.html"
|
||||
echo " car-help UI: http://localhost:8080"
|
||||
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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user