diff --git a/docker/Dockerfile.rust b/docker/Dockerfile.rust index 73cc58a15..cf69bb1d8 100644 --- a/docker/Dockerfile.rust +++ b/docker/Dockerfile.rust @@ -50,7 +50,12 @@ ENV RUST_LOG=info # Override at runtime: docker run -e CSI_SOURCE=esp32 ... ENV CSI_SOURCE=auto -ENTRYPOINT ["/bin/sh", "-c"] -# Shell-form CMD allows $CSI_SOURCE to be substituted at container start. -# The ENV default above (CSI_SOURCE=auto) applies when the variable is unset. -CMD ["/app/sensing-server --source ${CSI_SOURCE} --tick-ms 100 --ui-path /app/ui --http-port 3000 --ws-port 3001"] +ENTRYPOINT ["/app/sensing-server"] +# Exec-form CMD allows arguments after the image name to reach the binary directly. +# Use -e CSI_SOURCE=... to control the data source at runtime. +# Examples: +# docker run ruvnet/wifi-densepose:latest # auto mode (default) +# docker run -e CSI_SOURCE=simulated ruvnet/wifi-densepose:latest # synthetic data +# docker run -e CSI_SOURCE=esp32 ruvnet/wifi-densepose:latest # real ESP32 hardware +# docker run ruvnet/wifi-densepose:latest --source simulated # equivalent to above +CMD [] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 436dc1988..56efc8506 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -18,8 +18,8 @@ services: # wifi — use host Wi-Fi RSSI/scan data (Windows netsh) # simulated — generate synthetic CSI data (no hardware required) - CSI_SOURCE=${CSI_SOURCE:-auto} - # command is passed as arguments to ENTRYPOINT (/bin/sh -c), so $CSI_SOURCE is expanded by the shell. - command: ["/app/sensing-server --source ${CSI_SOURCE:-auto} --tick-ms 100 --ui-path /app/ui --http-port 3000 --ws-port 3001"] + # command args are passed directly to the binary; CSI_SOURCE env var is read by the server. + command: ["/app/sensing-server", "--source", "${CSI_SOURCE:-auto}", "--tick-ms", "100", "--ui-path", "/app/ui", "--http-port", "3000", "--ws-port", "3001"] python-sensing: build: