Closed martin8310 closed 8 months ago
Here is an example of modpoll usage in actual project, just for your reference.
version: '2'
volumes:
mosquitto-data:
services:
modpoll:
image: helloysd/modpoll
container_name: modpoll
restart: unless-stopped
depends_on:
- mosquitto
volumes:
- ./modpoll/config/:/app/config/
command: modpoll --tcp 192.168.133.85 --mqtt-host mosquitto --mqtt-topic-prefix project/9739518/sensor_data/ --mqtt-qos 1 --rate 30 --timeout 5 --interval 1 --timestamp --config config/modpoll_config_v4.csv
mosquitto:
image: helloysd/mosquitto
container_name: mosquitto
restart: unless-stopped
volumes:
- ./mosquitto/config:/mosquitto/config
- mosquitto-data:/mosquitto/data
ports:
- 1883:1883
For the network, you can use either bridge or host, depends on your project needs. The above example uses the default bridge. Hope it helps.
Shaodong
Hello,
Could you add a Docker compose file in your description?
which I would find good in the compose file:
Thank you in advance.
regards Martin