ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
607 stars 139 forks source link

CMD in Dockerfile #85

Open pietrofranceschi opened 5 years ago

pietrofranceschi commented 5 years ago

Hi Thom, first of all many thanks for your great job! I've got a problem running the daemon within the docker. If I am right the miflora-mqtt-daemon.py has a --config argument, which is instead included as "--config_dir" in the CMD of the Dockerfile. As far as I can see the daemon is not started if the entry in the Dockerfile is not fixed

ThomDietrich commented 5 years ago

Hey Pietro! Did you see https://github.com/ThomDietrich/miflora-mqtt-daemon#usage-with-docker Does this solve your issue

pietrofranceschi commented 5 years ago

Hi Thom, Thanks for the reply! I followed the usage notes. The only problem I've found (and solved) is that the line CMD [ "python3", "./miflora-mqtt-daemon.py", "--config_dir", "/config" ] in the Dockerfile tells docker to run

"python3 ./miflora-mqtt-daemon.py --config_dir /config"

but the execution help specifies that the right command should include the " --config" argument (not the "--config_dir")

python3 /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py --config /opt/miflora-config

To make the daemon starting I've been fixing the Dockerfile. Afterwards, everything was working perfectly

kind regards!

Pietro