| | 1 | = MQTT with Redis = |
| | 2 | |
| | 3 | Ref [https://github.com/jllopis/docker-mosquitto here] |
| | 4 | |
| | 5 | 1. get the hash key with following command |
| | 6 | {{{ |
| | 7 | krit@mini ~$ docker run -it docker-mosquitto-master_mosquitto np -p mypassword |
| | 8 | PBKDF2$sha256$901$9QuSsTtUWxCQZYN1$AqEXxC19zJcjcsaHUvSPzAIZA+zq0ccT |
| | 9 | }}} |
| | 10 | |
| | 11 | 2. get the ip address of redis-mosq docker by |
| | 12 | {{{ |
| | 13 | krit@mini ~$ docker inspect redis-mosq |
| | 14 | }}} |
| | 15 | |
| | 16 | 3. add user to redis-mosq with command "set user password" as follow |
| | 17 | {{{ |
| | 18 | krit@mini ~$ docker exec -it redis-mosq sh -c 'exec redis-cli -h "192.168.176.2" -p "6379"' |
| | 19 | 192.168.176.2:6379> set krit PBKDF2$sha256$901$9QuSsTtUWxCQZYN1$AqEXxC19zJcjcsaHUvSPzAIZA+zq0ccT |
| | 20 | 192.168.176.2:6379> quit |
| | 21 | }}} |