Sorry, I was a bit unclear. I was answering from my phone.
spark:
image: brewblox/brewblox-devcon-spark:rpi-develop
privileged: true
depends_on:
- eventbus
- datastore
restart: unless-stopped
labels:
- "traefik.port=5000"
- "traefik.frontend.rule=PathPrefix: /spark"
command: >
--device-host=192.168.1.58
For more than one spark, use unique names (at 3 places per service).
spark1:
image: brewblox/brewblox-devcon-spark:rpi-develop
privileged: true
depends_on:
- eventbus
- datastore
restart: unless-stopped
labels:
- "traefik.port=5000"
- "traefik.frontend.rule=PathPrefix: /spark1"
command: >
--name=spark1
--device-host=192.168.1.58
spark2:
image: brewblox/brewblox-devcon-spark:rpi-develop
privileged: true
depends_on:
- eventbus
- datastore
restart: unless-stopped
labels:
- "traefik.port=5000"
- "traefik.frontend.rule=PathPrefix: /spark2"
command: >
--name=spark2
--device-host=192.168.1.59
Besides of --device-host
, the service also supports --device-id=123456789012345678901234
, where the ID is the unique ID of your Photon/P1, which can be found in the Spark widget.
--device-host
sets to connect to a fixed IP, so set up a static lease in your router. If you provide only the device ID, it will try to find the Spark on USB or using mDNS network discovery.
Please note the > after command