Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MQTT_BROKER_URI=tcp://localhost:1833
MQTT_BROKER_URI=tcp://localhost:1883
MQTT_USERNAME=mqtt_user
MQTT_PASSWORD=secret
[email protected]
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,22 @@ from [docker hub](https://hub.docker.com/r/saicismartapi/saic-python-mqtt-gatewa
$ docker build -t saic-mqtt-gateway .
```

#### Use docker compose

There is a [docker compose file](docker-compose.yml) that shows how to set up the service.

First setup the hidden ".env" file in the root directory of the project with your specific data

Test your setup with
```
$ docker compose up
```

Let it run in background (dedicated)
```
$ docker compose up -d
```

## Commands over MQTT

The MQTT Gateway subscribes to MQTT topics where it is listening for commands. Every topic in the table below starts
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ services:
image: "saicismartapi/saic-python-mqtt-gateway:latest"
build:
context: .
restart: always
container_name: "saic-mqtt-gateway"
environment:
- MQTT_URI=${MQTT_BROKER_URI}
- MQTT_USER=${MQTT_USERNAME}
- MQTT_PASSWORD=${MQTT_PWD}
- MQTT_PASSWORD=${MQTT_PASSWORD}
- SAIC_USER=${SAIC_USERNAME}
- SAIC_PASSWORD=${SAIC_PWD}
volumes:
Expand Down
Loading