MQTT broker add

This commit is contained in:
2026-02-09 15:28:48 -05:00
parent 62bb5cb60d
commit 65f951dfcc
6 changed files with 77 additions and 5 deletions

View File

@@ -90,6 +90,23 @@ environment:
- DATABASE_URL=sqlite:///./drugs.db
```
## MQTT
The system includes an MQTT broker (Mosquitto) with WebSocket support:
- **MQTT**: `localhost:1883`
- **WebSocket**: `localhost:9001` or `/mqtt` via nginx
To create a new MQTT user with a custom password:
```bash
docker run --rm -v $(pwd)/mosquitto/config:/temp eclipse-mosquitto mosquitto_passwd -b /temp/pwfile username password
```
Then restart the containers:
```bash
docker compose restart mosquitto
```
## Development
When you run `docker-compose up`, the backend automatically reloads when code changes (`--reload` flag). Just refresh your browser to see updates.