Skip to content

Added docker compose to README and some Environment fixes #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
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
SAIC_USERNAME=me@home.da
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