Skip to content

Commit

Permalink
use enhanced prefix in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
john30 committed Jan 20, 2024
1 parent fe80841 commit 5c9153f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions contrib/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ automatically from the latest source on the git repository. Run the following co

Running interactively
---------------------
To run an ebusd container interactively, e.g. on serial device /dev/ttyUSB1, use the following command:
> docker run --rm -it --device=/dev/ttyUSB1:/dev/ttyUSB0 -p 8888 john30/ebusd
To run an ebusd container interactively, e.g. on enhanced serial device /dev/ttyUSB1, use the following command:
> docker run --rm -it --device=/dev/ttyUSB1:/dev/ttyUSB0 -p 8888 john30/ebusd -d ens:/dev/ttyUSB0
This will show the ebusd output directly in the terminal.


Running in background
---------------------
To start an ebusd container and have it run in the background, e.g. on serial device /dev/ttyUSB1, use the following command:
> docker run -d --name=ebusd --device=/dev/ttyUSB1:/dev/ttyUSB0 -p 8888 john30/ebusd
To start an ebusd container and have it run in the background, e.g. on enhanced serial device /dev/ttyUSB1, use the following command:
> docker run -d --name=ebusd --device=/dev/ttyUSB1:/dev/ttyUSB0 -p 8888 john30/ebusd -d ens:/dev/ttyUSB0
The container has the name "ebusd", so you can use that when querying docker about the container.

Expand All @@ -62,14 +62,14 @@ 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
replacing "BROKERHOST" with your MQTT broker host name or IP address:
> docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 john30/ebusd --scanconfig -d /dev/ttyUSB0 --mqttport=1883 --mqtthost=BROKERHOST
> docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 john30/ebusd --scanconfig -d ens:/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
> docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 -e EBUSD_SCANCONFIG= -e EBUSD_DEVICE=ens:/dev/ttyUSB0 -e EBUSD_MQTTPORT=1883 -e EBUSD_MQTTHOST=BROKERHOST john30/ebusd
This eases use of e.g. "docker-compose.yaml" files like [the example docker-compose file](https://github.com/john30/ebusd/blob/master/contrib/docker/docker-compose.example.yaml) also describing each available environment variable in it.

Expand Down
2 changes: 1 addition & 1 deletion contrib/docker/docker-compose.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:

# Use DEV as eBUS device ("enh:DEVICE" or "enh:IP:PORT" for enhanced device, "ens:DEVICE" for enhanced high speed
# serial device, "DEVICE" for serial device, or "[udp:]IP:PORT" for network device)
EBUSD_DEVICE: "/dev/ttyUSB0"
EBUSD_DEVICE: "ens:/dev/ttyUSB0"
# Skip serial eBUS device test
#EBUSD_NODEVICECHECK: ""
# Only read from device, never write to it
Expand Down

0 comments on commit 5c9153f

Please sign in to comment.