Browse Source

Container ok but does not connect

master
commit
c3ab16a41b
4 changed files with 39 additions and 0 deletions
  1. +8
    -0
      Readme.md
  2. +10
    -0
      config/mosquitto.conf
  3. +1
    -0
      config/mosquitto.passwd
  4. +20
    -0
      docker-compose.yml

+ 8
- 0
Readme.md View File

@ -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'

+ 10
- 0
config/mosquitto.conf View File

@ -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

+ 1
- 0
config/mosquitto.passwd View File

@ -0,0 +1 @@
guest:$7$101$Pv5OZ3GeXExNxunX$Gd58gXd7Boj1/pfrvEErRCIiM+aNVkQRxY7VykWmsYO/jOxxaRxC13fi3oecR8YRqZ3ix5ZZpEj+6tmK7NFLZw==

+ 20
- 0
docker-compose.yml View File

@ -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:

Loading…
Cancel
Save