Daily Workflow & Updating the SDK
Who this is for: Developers who have finished setup and want the day-to-day commands.
What you'll accomplish: Start, check, tail, stop, and rebuild the stack, and update to new code cleanly.
Everyday commands
From the repository root (SandGrain-TrustBridgeSDK/):
# Start everything
# Windows
.\TrustBridge\TrustBridge-BE\start-all.ps1
# Linux/macOS
./TrustBridge/TrustBridge-BE/start-all.sh
# Status
.\TrustBridge\TrustBridge-BE\start-all.ps1 status # Windows
./TrustBridge/TrustBridge-BE/start-all.sh status # Linux/macOS
# Tail one service (Ctrl+C stops tailing: does NOT stop the container)
# Services: be | fe | cloud-sdk | mysql | mosquitto
.\TrustBridge\TrustBridge-BE\start-all.ps1 logs be # Windows
./TrustBridge/TrustBridge-BE/start-all.sh logs be # Linux/macOS
# Stop everything (volumes preserved)
.\TrustBridge\TrustBridge-BE\start-all.ps1 down # Windows
./TrustBridge/TrustBridge-BE/start-all.sh down # Linux/macOS
# Stop AND wipe volumes (forces a re-seed on next start)
.\TrustBridge\TrustBridge-BE\start-all.ps1 wipe # Windows
./TrustBridge/TrustBridge-BE/start-all.sh wipe # Linux/macOS
# Force a --no-cache rebuild + start (use when an image is stuck on old source)
.\TrustBridge\TrustBridge-BE\start-all.ps1 rebuild # Windows
./TrustBridge/TrustBridge-BE/start-all.sh rebuild # Linux/macOS
Running the SDK side
cd SandGrain-SDK
# Same machine
.\run_all.ps1 --no-cloud # Windows
bash run_all.sh --no-cloud # Linux/macOS/WSL
# Different machines, or run individually
./run_gateway.sh
./run_device.sh
Common scenarios
-
After a reboot. Docker Engine starts at boot on Linux (you ran
systemctl enable --now docker); on macOS/Windows, Docker Desktop auto-starts. Just runstart-all up. -
Pulled new backend / frontend / Cloud SDK code.
start-all upre-runsdocker compose up --build, so changed images rebuild automatically. -
Pulled new device-side SDK code. Re-run the SDK launcher (
run_all --no-cloud), it always recompiles. -
Changed
.envin the backend.start-all downthenstart-all up.
Updating to new code
cd SandGrain-TrustBridgeSDK
git fetch origin
git checkout release/vX.X.X
git pull
Then follow with start-all up (the stack) and run_all --no-cloud (the SDK side) as above.
Keep your repo on release/v3.6.0. After pulling new device-side code, the firmware is rebuilt with make clean && make (the launchers handle this).