This guide covers all deployment scenarios, from quick automated updates to manual installation and hybrid development.
- Docker Desktop with buildx support
- SSH access to Raspberry Pi (user:
ff22, password:ff22+) - Sufficient disk space (images are ~500MB each compressed)
- Node.js 18.x for local development
Note: During deployment, you'll be prompted to enter the SSH password multiple times.
This automatically handles all steps: build, save, transfer, load, and restart.
Full Deployment:
npm run docker:build
npm run docker:deploy -- ff22@192.168.0.100
# Enter password when prompted: ff22+Selective Deployment (Faster): If you only changed specific services, you can deploy just those:
# Build only frontend
npm run docker:build -- userdev frontend
# Deploy only central-control and nodered
npm run docker:deploy -- ff22@192.168.0.100 userdev central noderedAvailable services: central, frontend, nodered
1. Build images:
npm run docker:build v1.3.02. Save to files:
npm run docker:save v1.3.0Creates tar files in docker-images/:
ff-ccu-armv7-v1.3.0.tar.gzff-frontend-armv7-v1.3.0.tar.gzff-nodered-armv7-v1.3.0.tar.gz
3. Transfer to Raspberry Pi:
scp docker-images/*.tar.gz ff22@192.168.0.100:/tmp/
# Enter password when prompted: ff22+4. Load images on Pi:
ssh ff22@192.168.0.100
# Enter password when prompted: ff22+
cd /tmp
gunzip -c ff-ccu-armv7-v1.3.0.tar.gz | docker load
gunzip -c ff-nodered-armv7-v1.3.0.tar.gz | docker load
gunzip -c ff-frontend-armv7-v1.3.0.tar.gz | docker load5. Update docker-compose.yml:
cd /path/to/project
# Edit docker-compose-prod.yml to use new tag
nano docker-compose-prod.yml6. Restart services:
docker compose -f docker-compose-prod.yml down
docker compose -f docker-compose-prod.yml up -d7. Clean up:
docker image prune -a
rm /tmp/*.tar.gzPush images to GitHub Container Registry for easier distribution:
# Login to registry
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
# Push images
docker push ghcr.io/ommsolutions/ff-ccu-armv7:v1.3.0
docker push ghcr.io/ommsolutions/ff-nodered-armv7:v1.3.0
docker push ghcr.io/ommsolutions/ff-frontend-armv7:v1.3.0Then on Raspberry Pi:
docker compose -f docker-compose-prod.yml pull
docker compose -f docker-compose-prod.yml up -dCheck running containers:
ssh ff22@192.168.0.100
docker psView logs:
docker compose -f docker-compose-prod.yml logs -fAccess services:
- Web UI: http://raspberrypi.local or http://\<rpi-ip\>
- Node-RED: http://raspberrypi.local:1880
Enable automatic startup on Raspberry Pi boot:
ssh ff22@raspberrypi.local
# Password: ff22+
sudo cp raspberrypi/fischer-techik.service /etc/systemd/system/
sudo systemctl enable fischer-techik.service
sudo systemctl start fischer-techik.serviceDevelop services locally while using the MQTT broker on Raspberry Pi.
1. Stop the service you want to develop locally:
ssh ff22@192.168.0.100
# Enter password if prompted: ff22+
cd /path/to/project
docker compose -f docker-compose-prod.yml stop central-control
# or: docker compose -f docker-compose-prod.yml stop frontend2. Configure local environment:
For central-control, create .env:
cd central-control
cat > .env << EOF
MQTT_URL=mqtt://192.168.0.100:1883
MQTT_USER=admin
MQTT_PASS=<password>
EOFFor frontend, update src/environments/environment.ts with the Pi's MQTT broker URL.
3. Run locally:
# Central Control
cd central-control
npm start # Or: npm run start:debug
# Frontend
cd frontend
npm start # Access at http://localhost:4200# Install MQTT clients
# Ubuntu/Debian: apt-get install mosquitto-clients
# macOS: brew install mosquitto
# Subscribe to topics
mosquitto_sub -h 192.168.0.100 -p 1883 -u admin -P <password> -t 'ccu/#' -v
# Publish test message
mosquitto_pub -h 192.168.0.100 -p 1883 -u admin -P <password> -t 'ccu/test' -m 'Hello'Scenario 1: Develop Backend Only
# On Pi: Stop only backend
docker compose -f docker-compose-prod.yml stop central-control
# Locally: Run backend
cd central-control
npm start
# Access frontend at http://192.168.0.100Scenario 2: Develop Frontend Only
# On Pi: Stop only frontend
docker compose -f docker-compose-prod.yml stop frontend
# Locally: Run frontend
cd frontend
npm start
# Access at http://localhost:4200Scenario 3: Develop Both Locally
# On Pi: Keep only MQTT running
docker compose -f docker-compose-prod.yml stop frontend central-control
# Terminal 1
cd central-control && npm start
# Terminal 2
cd frontend && npm start
# Access at http://localhost:4200Restart stopped containers on Pi:
docker compose -f docker-compose-prod.yml start central-control frontendNo space left:
docker system prune -aARM build fails:
# Ensure buildx is installed
docker buildx version
# Create builder if needed
docker buildx create --name multiarch --useSSH connection refused:
ssh ff22@192.168.0.100 "sudo systemctl status ssh"Host key verification failed:
If you see this error when npm start tries to connect to the Pi, it means the Pi's identity key has changed (e.g., OS reinstall).
- Fix: Remove the old key from your known hosts file:
- Windows: Open
~/.ssh/known_hostsand delete the line starting with192.168.0.100or172... - Command:
ssh-keygen -R 192.168.0.100
- Windows: Open
Images not loading:
# Verify tar files
gunzip -t docker-images/*.tar.gzContainers not starting:
# Check logs
docker compose -f docker-compose-prod.yml logs
# Verify config syntax
docker compose -f docker-compose-prod.yml configMQTT connection fails:
- Ensure firewall allows port 1883
- Check MQTT broker is running:
docker ps | grep mosquitto - Verify credentials in .env file
Frontend can't connect:
- Check that frontend container is running
- Verify port 80 (or 4200 for dev) is not blocked
- Check browser console for connection errors
- Version your images: Use semantic versioning (v1.3.0) instead of just
latest - Test locally first: Always test builds with
npm startbefore deploying - Backup before update: Save current docker-compose-prod.yml before changes
- Monitor logs: Use
docker compose logs -fduring deployment - Clean up regularly: Run
docker image pruneto remove old images
- README.md - Quick start and basic usage
- central-control/README.md - MQTT protocol documentation
- nodeRed/readme.md - Node-RED configuration