fix: Docker port mismatch — server now binds 3000/3001 as documented
The sensing server defaults to HTTP :8080 and WS :8765, but Docker exposes :3000/:3001. Added --http-port 3000 --ws-port 3001 to CMD in both Dockerfile.rust and docker-compose.yml. Verified both images build and run: - Rust: 133 MB, all endpoints responding (health, sensing/latest, vital-signs, pose/current, info, model/info, UI) - Python: 569 MB, all packages importable (websockets, fastapi) - RVF file: 13 KB, valid RVFS magic bytes Also fixed README Quick Start endpoints to match actual routes: - /api/v1/health → /health - /api/v1/sensing → /api/v1/sensing/latest - Added /api/v1/pose/current and /api/v1/info examples - Added port mapping note for Docker vs local dev Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
12
README.md
12
README.md
@@ -271,13 +271,19 @@ system.stop()
|
||||
|
||||
```bash
|
||||
# Health check
|
||||
curl http://localhost:3000/api/v1/health
|
||||
curl http://localhost:3000/health
|
||||
|
||||
# Latest sensing frame
|
||||
curl http://localhost:3000/api/v1/sensing
|
||||
curl http://localhost:3000/api/v1/sensing/latest
|
||||
|
||||
# Vital signs
|
||||
curl http://localhost:3000/api/v1/vital-signs
|
||||
|
||||
# Pose estimation
|
||||
curl http://localhost:3000/api/v1/pose/current
|
||||
|
||||
# Server info
|
||||
curl http://localhost:3000/api/v1/info
|
||||
```
|
||||
|
||||
### 4. Real-time WebSocket
|
||||
@@ -942,6 +948,8 @@ POST /api/v1/model/sona/activate # Activate SONA profile
|
||||
|
||||
WebSocket: `ws://localhost:8765/ws/sensing` (real-time sensing + vital signs)
|
||||
|
||||
> Default ports: HTTP 8080, WS 8765. Docker images remap to 3000/3001 via `--http-port` / `--ws-port`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
@@ -43,4 +43,4 @@ EXPOSE 5005/udp
|
||||
ENV RUST_LOG=info
|
||||
|
||||
ENTRYPOINT ["/app/sensing-server"]
|
||||
CMD ["--source", "simulated", "--tick-ms", "100", "--ui-path", "/app/ui"]
|
||||
CMD ["--source", "simulated", "--tick-ms", "100", "--ui-path", "/app/ui", "--http-port", "3000", "--ws-port", "3001"]
|
||||
|
||||
@@ -12,7 +12,7 @@ services:
|
||||
- "5005:5005/udp" # ESP32 UDP
|
||||
environment:
|
||||
- RUST_LOG=info
|
||||
command: ["--source", "simulated", "--tick-ms", "100", "--ui-path", "/app/ui"]
|
||||
command: ["--source", "simulated", "--tick-ms", "100", "--ui-path", "/app/ui", "--http-port", "3000", "--ws-port", "3001"]
|
||||
|
||||
python-sensing:
|
||||
build:
|
||||
|
||||
Reference in New Issue
Block a user