commit c3ab16a41b63f7c36a55e40a962b8b3bd8d38396 Author: Gerardo Marx Date: Wed Mar 2 19:19:21 2022 -0600 Container ok but does not connect diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..c2b1d46 --- /dev/null +++ b/Readme.md @@ -0,0 +1,8 @@ +# Readme +'docker-compose exec mqtt sh' + +'mosquitto_passwd -c /etc/mosquitto/passwd guest' + +actual password 1234 + +'password_file /mosquito/config/mosquitto.passwd' diff --git a/config/mosquitto.conf b/config/mosquitto.conf new file mode 100644 index 0000000..e5de672 --- /dev/null +++ b/config/mosquitto.conf @@ -0,0 +1,10 @@ +persistence true +persistence_location /mosquitto/data/ +log_dest file /mosquitto/log/mosquitto.log + +allow_anonymous false +password_file /mosquito/config/mosquitto.passwd + +listener 1883 +listener 9001 +protocol websockets diff --git a/config/mosquitto.passwd b/config/mosquitto.passwd new file mode 100644 index 0000000..57b5967 --- /dev/null +++ b/config/mosquitto.passwd @@ -0,0 +1 @@ +guest:$7$101$Pv5OZ3GeXExNxunX$Gd58gXd7Boj1/pfrvEErRCIiM+aNVkQRxY7VykWmsYO/jOxxaRxC13fi3oecR8YRqZ3ix5ZZpEj+6tmK7NFLZw== diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a2e7f62 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '2' + +services: + mqtt: + container_name: mosquitto + image: eclipse-mosquitto:2.0.11 + restart: always + ports: + - "1883:1883" + - "9001:9001" + volumes: + - ./config:/mosquitto/config + - ./data:/mosquitto/data + - ./log:/mosquitto/log + + +volumes: + config: + data: + log: