mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-10 04:19:24 +02:00
update mosquitto
This commit is contained in:
parent
2a8dbb280e
commit
97bc6ddca0
@ -2,8 +2,8 @@
|
|||||||
# Dockerfile for mosquitto
|
# Dockerfile for mosquitto
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine:3
|
||||||
MAINTAINER kev <noreply@easypi.pro>
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates mosquitto
|
RUN apk add --no-cache ca-certificates mosquitto
|
||||||
|
|
||||||
|
@ -4,33 +4,35 @@ mosquitto
|
|||||||
![](https://badge.imagelayers.io/vimagick/mosquitto:latest.svg)
|
![](https://badge.imagelayers.io/vimagick/mosquitto:latest.svg)
|
||||||
|
|
||||||
[Mosquitto][1] is an open source (BSD licensed) message broker that implements
|
[Mosquitto][1] is an open source (BSD licensed) message broker that implements
|
||||||
the MQ Telemetry Transport protocol versions 3.1 and 3.1.1.
|
the MQTT protocol versions 3.1 and 3.1.1.
|
||||||
|
|
||||||
## docker-compose.yml
|
## docker-compose.yml
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
mosquitto:
|
version: "3.8"
|
||||||
image: vimagick/mosquitto
|
services:
|
||||||
ports:
|
mosquitto:
|
||||||
- "1883:1883"
|
image: vimagick/mosquitto
|
||||||
- "8080:8080"
|
ports:
|
||||||
- "8883:8883"
|
- "1883:1883"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/mosquitto.conf:/etc/mosquitto/mosquitto.conf
|
- ./data/etc:/etc/mosquitto
|
||||||
- ./data/pwfile:/etc/mosquitto/pwfile
|
- ./data/var:/var/lib/mosquitto
|
||||||
- ./data:/var/lib/mosquitto
|
restart: unless-stopped
|
||||||
restart: always
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## mosquitto.conf
|
## mosquitto.conf
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
port 1883
|
listener 1883
|
||||||
log_dest stdout
|
log_dest stdout
|
||||||
allow_anonymous false
|
allow_anonymous false
|
||||||
password_file /etc/mosquitto/pwfile
|
password_file /etc/mosquitto/pwfile
|
||||||
persistence true
|
persistence true
|
||||||
persistence_location /var/lib/mosquitto
|
persistence_location /var/lib/mosquitto
|
||||||
|
persistence_file mosquitto.db
|
||||||
|
#plugin /usr/lib/mosquitto_dynamic_security.so
|
||||||
|
#plugin_opt_config_file /etc/mosquitto/dynamic-security.json
|
||||||
|
|
||||||
###### ENABLE TLS ######
|
###### ENABLE TLS ######
|
||||||
listener 8883
|
listener 8883
|
||||||
@ -51,9 +53,10 @@ require_certificate false
|
|||||||
## server
|
## server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mkdir -m 777 data
|
$ mkdir -p data/{etc,var}
|
||||||
$ touch data/mosquitto.conf data/pwfile
|
$ chmod -R 777 data
|
||||||
$ vi data/mosquitto.conf
|
$ touch data/etc/mosquitto.conf data/etc/pwfile
|
||||||
|
$ vi data/etc/mosquitto.conf
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
$ docker-compose exec mosquitto sh
|
$ docker-compose exec mosquitto sh
|
||||||
>>> cd /etc/mosquitto
|
>>> cd /etc/mosquitto
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Dockerfile for mosquitto-arm
|
# Dockerfile for mosquitto-arm
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM easypi/alpine-arm
|
FROM alpine:3
|
||||||
MAINTAINER EasyPi Software Foundation
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates mosquitto
|
RUN apk add --no-cache ca-certificates mosquitto
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
mosquitto:
|
version: "3.8"
|
||||||
image: easypi/mosquitto-arm
|
services:
|
||||||
ports:
|
mosquitto:
|
||||||
- "1883:1883"
|
image: easypi/mosquitto-arm64
|
||||||
- "8080:8080"
|
ports:
|
||||||
- "8883:8883"
|
- "1883:1883"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/mosquitto.conf:/etc/mosquitto/mosquitto.conf
|
- ./data/etc:/etc/mosquitto
|
||||||
- ./data/pwfile:/etc/mosquitto/pwfile
|
- ./data/var:/var/lib/mosquitto
|
||||||
- ./data:/var/lib/mosquitto
|
restart: unless-stopped
|
||||||
restart: always
|
|
||||||
|
@ -2,12 +2,15 @@
|
|||||||
# Docs: https://mosquitto.org/man/mosquitto-conf-5.html
|
# Docs: https://mosquitto.org/man/mosquitto-conf-5.html
|
||||||
#
|
#
|
||||||
|
|
||||||
port 1883
|
listener 1883
|
||||||
log_dest stdout
|
log_dest stdout
|
||||||
allow_anonymous false
|
allow_anonymous false
|
||||||
password_file /etc/mosquitto/pwfile
|
password_file /etc/mosquitto/pwfile
|
||||||
persistence true
|
persistence true
|
||||||
persistence_location /var/lib/mosquitto/
|
persistence_location /var/lib/mosquitto
|
||||||
|
persistence_file mosquitto.db
|
||||||
|
#plugin /usr/lib/mosquitto_dynamic_security.so
|
||||||
|
#plugin_opt_config_file /etc/mosquitto/dynamic-security.json
|
||||||
|
|
||||||
###### ENABLE WS ######
|
###### ENABLE WS ######
|
||||||
#listener 8080
|
#listener 8080
|
0
mosquitto/data/var/.gitkeep
Normal file
0
mosquitto/data/var/.gitkeep
Normal file
@ -1,11 +1,10 @@
|
|||||||
mosquitto:
|
version: "3.8"
|
||||||
image: vimagick/mosquitto
|
services:
|
||||||
ports:
|
mosquitto:
|
||||||
- "1883:1883"
|
image: vimagick/mosquitto
|
||||||
- "8080:8080"
|
ports:
|
||||||
- "8883:8883"
|
- "1883:1883"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/mosquitto.conf:/etc/mosquitto/mosquitto.conf
|
- ./data/etc:/etc/mosquitto
|
||||||
- ./data/pwfile:/etc/mosquitto/pwfile
|
- ./data/var:/var/lib/mosquitto
|
||||||
- ./data:/var/lib/mosquitto
|
restart: unless-stopped
|
||||||
restart: always
|
|
||||||
|
Loading…
Reference in New Issue
Block a user