Describe docker compose example
This commit is contained in:
19
ReadMe.md
19
ReadMe.md
@@ -38,3 +38,22 @@ Set the following parameter:
|
||||
|
||||
|
||||
```docker run -t -i --device=/dev/ttyUSB0 -e SERIAL_DEVICE="/dev/ttyUSB0" -e MQTT_SERVER="192.168.x.y" -e MQTT_TOPIC="testtopic/" sha256:```
|
||||
|
||||
#### Execution via Docker Compose
|
||||
```
|
||||
# template docker-compose.yml
|
||||
services:
|
||||
python_app:
|
||||
attach: false
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- SERIAL_DEVICE=/dev/ttyUSB0
|
||||
- MQTT_SERVER=192.168.x.y
|
||||
- MQTT_TOPIC=testtopic/
|
||||
devices:
|
||||
- "/dev/ttyUSB0:/dev/ttyUSB0"
|
||||
```
|
||||
build image: **docker-compose up --build**
|
||||
start with **docker-compose up --detach**
|
||||
|
||||
Reference in New Issue
Block a user