Files
wifi-densepose/docker/Dockerfile.rust
ruv 44b9c30dbc 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>
2026-03-01 00:56:41 -05:00

47 lines
1.1 KiB
Docker

# WiFi-DensePose Rust Sensing Server
# Includes RuVector signal intelligence crates
# Multi-stage build for minimal final image
# Stage 1: Build
FROM rust:1.85-bookworm AS builder
WORKDIR /build
# Copy workspace files
COPY rust-port/wifi-densepose-rs/Cargo.toml rust-port/wifi-densepose-rs/Cargo.lock ./
COPY rust-port/wifi-densepose-rs/crates/ ./crates/
# Copy vendored RuVector crates
COPY vendor/ruvector/ /build/vendor/ruvector/
# Build release binary
RUN cargo build --release -p wifi-densepose-sensing-server 2>&1 \
&& strip target/release/sensing-server
# Stage 2: Runtime
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy binary
COPY --from=builder /build/target/release/sensing-server /app/sensing-server
# Copy UI assets
COPY ui/ /app/ui/
# HTTP API
EXPOSE 3000
# WebSocket
EXPOSE 3001
# ESP32 UDP
EXPOSE 5005/udp
ENV RUST_LOG=info
ENTRYPOINT ["/app/sensing-server"]
CMD ["--source", "simulated", "--tick-ms", "100", "--ui-path", "/app/ui", "--http-port", "3000", "--ws-port", "3001"]