= MQTT with Redis = Ref [https://github.com/jllopis/docker-mosquitto here] [[br]] We can get the whole folder by [attachment:docker-mosquitto-master.tar file] [[br]] 1. untar [attachment:docker-mosquitto-master.tar file] and run '''docker-compose up -d ''' {{{ anunda@Storage1:~/MQTT_REDIS/docker-mosquitto-master$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 89a4bf87fc23 docker-mosquitto-master_mosquitto "/run.sh mosquitto" About an hour ago Up About an hour 8883/tcp, 0.0.0.0:1883->1883/tcp, 0.0.0.0:9883->9883/tcp, 9001-9002/tcp docker-mosquitto-master_mosquitto_1 a05510662c79 redis:5.0.4-alpine "docker-entrypoint.s…" About an hour ago Up About an hour 0.0.0.0:6379->6379/tcp redis-mosq }}} 2. get the hash key with following command {{{ krit@mini ~$ docker run -it docker-mosquitto-master_mosquitto np -p mypassword PBKDF2$sha256$901$9QuSsTtUWxCQZYN1$AqEXxC19zJcjcsaHUvSPzAIZA+zq0ccT }}} 3. get the ip address of redis-mosq docker by {{{ krit@mini ~$ docker inspect redis-mosq }}} 4. add user to redis-mosq with command "set user password" as follow {{{ krit@mini ~$ docker exec -it redis-mosq sh -c 'exec redis-cli -h "192.168.176.2" -p "6379"' 192.168.176.2:6379> set krit PBKDF2$sha256$901$9QuSsTtUWxCQZYN1$AqEXxC19zJcjcsaHUvSPzAIZA+zq0ccT 192.168.176.2:6379> quit }}}