You've already forked dockerfiles
mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-08-10 22:31:28 +02:00
update mosquitto
This commit is contained in:
@@ -50,8 +50,9 @@ $ touch data/mosquitto.conf data/pwfile
|
||||
$ docker-compose up -d
|
||||
$ docker-compose exec mosquitto sh
|
||||
>>> cd /etc/mosquitto
|
||||
>>> echo username:password >> data/pwfile
|
||||
>>> mosquitto_passwd -U passwd
|
||||
>>> mosquitto_passwd -b pwfile username password
|
||||
>>> cat pwfile
|
||||
username:$6$IuF7JUzS1k/QoF3y$YpiClom7/==
|
||||
>>> exit
|
||||
$ docker-compose restart
|
||||
$ docker-compose logs -f
|
||||
|
14
mosquitto/arm/data/mosquitto.conf
Normal file
14
mosquitto/arm/data/mosquitto.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
listener 8080
|
||||
protocol websockets
|
||||
log_dest stdout
|
||||
allow_anonymous false
|
||||
password_file /etc/mosquitto/pwfile
|
||||
persistence true
|
||||
persistence_location /var/lib/mosquitto
|
||||
|
||||
###### ENABLE TLS ######
|
||||
#port 8883
|
||||
#cafile /var/lib/mosquitto/ca.crt
|
||||
#certfile /var/lib/mosquitto/server.crt
|
||||
#keyfile /var/lib/mosquitto/server.key
|
||||
#require_certificate false
|
@@ -2,4 +2,10 @@ mosquitto:
|
||||
image: easypi/mosquitto-arm
|
||||
ports:
|
||||
- "1883:1883"
|
||||
- "8080:8080"
|
||||
- "8883:8883"
|
||||
volumes:
|
||||
- ./data/mosquitto.conf:/etc/mosquitto/mosquitto.conf
|
||||
- ./data/pwfile:/etc/mosquitto/pwfile
|
||||
- ./data:/var/lib/mosquitto
|
||||
restart: always
|
||||
|
0
mosquitto/data/pwfile
Normal file
0
mosquitto/data/pwfile
Normal file
@@ -6,5 +6,6 @@ mosquitto:
|
||||
- "8883:8883"
|
||||
volumes:
|
||||
- ./data/mosquitto.conf:/etc/mosquitto/mosquitto.conf
|
||||
- ./data/pwfile:/etc/mosquitto/pwfile
|
||||
- ./data:/var/lib/mosquitto
|
||||
restart: always
|
||||
|
Reference in New Issue
Block a user