initial commit
This commit is contained in:
9
README.MD
Normal file
9
README.MD
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Refer to https://github.com/sukesh-ak/setup-mosquitto-with-docker for more details
|
||||||
|
|
||||||
|
Must create mosquitto.conf file manually
|
||||||
|
|
||||||
|
Create password file
|
||||||
|
touch config/pwfile
|
||||||
|
|
||||||
|
From mqtt container terminal issue the following command and you will be prompted for a password
|
||||||
|
mosquitto_passwd -c /mosquitto/config/pwfile mqtt-user
|
||||||
8
config/mosquitto.conf
Normal file
8
config/mosquitto.conf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
allow_anonymous false
|
||||||
|
listener 1883
|
||||||
|
listener 9001
|
||||||
|
protocol websockets
|
||||||
|
persistence true
|
||||||
|
password_file /mosquitto/config/pwfile
|
||||||
|
persistence_file mosquitto.db
|
||||||
|
persistence_location /mosquitto/data/
|
||||||
26
docker-compose.yaml
Normal file
26
docker-compose.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
name: mqtt
|
||||||
|
|
||||||
|
services:
|
||||||
|
mqtt5:
|
||||||
|
image: eclipse-mosquitto
|
||||||
|
container_name: mqtt5
|
||||||
|
ports:
|
||||||
|
- "1883:1883" #default mqtt port
|
||||||
|
- "9001:9001" #default mqtt port for websockets
|
||||||
|
volumes:
|
||||||
|
- /home/mattspeer/docker/mqtt/config:/mosquitto/config:rw
|
||||||
|
- /home/mattspeer/docker/mqtt/data:/mosquitto/data:rw
|
||||||
|
- /home/mattspeer/docker/mqtt/log:/mosquitto/log:rw
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# volumes for mapping data,config and log
|
||||||
|
#volumes:
|
||||||
|
# config:
|
||||||
|
# data:
|
||||||
|
# log:
|
||||||
|
|
||||||
|
#networks:
|
||||||
|
# default:
|
||||||
|
# name: mqtt5-network
|
||||||
Reference in New Issue
Block a user