Docker Eclipse mosquitto installation on Raspberry Pi 4

preview_player
Показать описание
****************Commands****************
__create folder docker
mkdir docker
__open folder docker
cd docker
__create folder mqtt
mkdir mqtt
__open folder mqtt
cd mqtt

cd mqtt
___copy and paste into the file
#------------------------------------------
version: '2'

services:
##Mosquitto
mqtt:
container_name: mosquitto
image: eclipse-mosquitto:2.0.11
restart: always
ports:
- "1883:1883"
- "9001:9001"
volumes:
- /home/pi/docker/mqtt/config:/mosquitto/config
- /home/pi/docker/mqtt/data:/mosquitto/data
- /home/pi/docker/mqtt/log:/mosquitto/log
volumes:
config:
data:
log:
#------------------------------------------
__create container mqtt
docker-compose up -d

__open folder config
cd config
__copy and paste into the file
#------------------------------------------
persistence true
persistence_location /mosquitto/data/
#------------------------------------------

__check container is in run
docker ps
__open the container shell
docker exec -it (Number ID container??) sh
___add a user to a new password file
exit

___copy and paste into the file
#------------------------------------------
persistence true
persistence_location /mosquitto/data/

allow_anonymous false

listener 1883
listener 9001
protocol websockets
#------------------------------------------

************Directory structure************
|--docker
|--mqtt
|--config
|--data
|--log
Рекомендации по теме
Комментарии
Автор

This video is so great, as well as the transcript. The instruction is extremely clear. No waste of any time!

ddrecc
Автор

Thanks. I needed a step by step example that didn't assume I knew all the details.

nigelhewitt
Автор

I have tried several other tutorials and had problems. Your presentation was clear and worked first time. I now have to watch all your other submissions. Thank you

chet
Автор

muchas gracias por este tutorial aunque solo tuve que cambiar a version 3, muy bueno he instructivo felicidades al autor, thank you thank you

franciscosolis
Автор

I've been looking for a tutorial on how to set this up on a raspberry pi for a bit now, and this is by far the clearest video showing you how. Thank you!

jonahferguson
Автор

Very clear video, TNX for your step by step explanations. Great!

EttoreBartoccetti
Автор

A great tutorial. I followed the commands along with some reference to the video. All worked perfectly. Many thanks!

johnsimpson
Автор

You're a life saver, thanks a lot.

mikelee
Автор

Wow! This was so well done! Great video! Thank you very much! I just subbed too!

Skhulile
Автор

this worked great for me, but i had continual issues with the suggested version of MQTT linked here. random messages kept being resent, and my devices were going haywire randomly. the fix was to blow everything up and redo these steps, but using 2.0.14 instead of 2.0.11

cabasse_music
Автор

Hi, great tutorial and the very first actually working. But there was a little problem in the beginning when it came to this command "sudo apt install docker-compose" because the return was "docker-compose: command not found". I fixed that by running this command in docker "docker run hello-world". After that all dependencies were correct. But where was the error? Thanks Dom

DoBaMan
visit shbcf.ru