remove no longer needed "-f" and add chapter for env vars
This commit is contained in:
@@ -53,14 +53,25 @@ Using a network device
|
|||||||
|
|
||||||
When using a network device, the "--device" argument to docker can be omitted, but the device information has to be
|
When using a network device, the "--device" argument to docker can be omitted, but the device information has to be
|
||||||
passed on to ebusd:
|
passed on to ebusd:
|
||||||
> docker run --rm -it -p 8888 john30/ebusd -f --scanconfig -d 192.168.178.123:10000 --latency=20
|
> docker run --rm -it -p 8888 john30/ebusd --scanconfig -d 192.168.178.123:10000 --latency=20
|
||||||
|
|
||||||
Note: the default "-f" and "--scanconfig" arguments are only passed to ebusd if it is called without any additional arguments.
|
Note: the required "-f" (foreground) argument is passed as environment variable and does not need to be specified anymore.
|
||||||
So when passing further arguments, these two usually need to be added as well.
|
|
||||||
|
Note: the default "--scanconfig" argument is only passed to ebusd if it is called without any additional arguments.
|
||||||
|
So when passing further arguments, this usually needs to be added as well or set as environment variable EBUSD_SCANCONFIG.
|
||||||
|
|
||||||
|
|
||||||
Running with MQTT broker
|
Running with MQTT broker
|
||||||
------------------------
|
------------------------
|
||||||
To start an ebusd container in the background and have it connect to your MQTT broker, use the following command while
|
To start an ebusd container in the background and have it connect to your MQTT broker, use the following command while
|
||||||
replacing "BROKERHOST" with your MQTT broker host name or IP address:
|
replacing "BROKERHOST" with your MQTT broker host name or IP address:
|
||||||
> docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 john30/ebusd -f --scanconfig -d /dev/ttyUSB0 --mqttport=1883 --mqtthost=BROKERHOST
|
> docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 john30/ebusd --scanconfig -d /dev/ttyUSB0 --mqttport=1883 --mqtthost=BROKERHOST
|
||||||
|
|
||||||
|
|
||||||
|
Use of environment variables
|
||||||
|
----------------------------
|
||||||
|
Instead of passing arguments (at the end of docker run) to ebusd, almost all (long) arguments can also be passed as
|
||||||
|
environment variables with the prefix `EBUSD_`, e.g. the following line can be used instead of the last example above:
|
||||||
|
> docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 -e EBUSD_SCANCONFIG= -e EBUSD_DEVICE=/dev/ttyUSB0 -e EBUSD_MQTTPORT=1883 -e EBUSD_MQTTHOST=BROKERHOST john30/ebusd
|
||||||
|
|
||||||
|
This eases use of e.g. docker-compose files.
|
||||||
|
|||||||
Reference in New Issue
Block a user