MQTT broker add
This commit is contained in:
17
README.md
17
README.md
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user