mqtt added to configuration
This commit is contained in:
parent
75ec7e5374
commit
3d26f067de
15
mqtt/Dockerfile
Normal file
15
mqtt/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM eclipse-mosquitto:2
|
||||||
|
|
||||||
|
arg UID=1000
|
||||||
|
arg GID=1000
|
||||||
|
arg USER=unicorn
|
||||||
|
|
||||||
|
RUN if [ ${USER} != "root" ]; then \
|
||||||
|
apk add shadow && \
|
||||||
|
groupadd -f -g ${GID} ${USER} && \
|
||||||
|
useradd -m -g ${USER} -u ${UID} ${USER}; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
RUN chown -R ${USER}:${USER} /mosquitto
|
||||||
|
|
||||||
|
USER ${USER}
|
10
mqtt/config_templates/open/mosquitto.conf
Normal file
10
mqtt/config_templates/open/mosquitto.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
listener 1883
|
||||||
|
persistence true
|
||||||
|
persistence_location /mosquitto/data/
|
||||||
|
|
||||||
|
## Authentication ##
|
||||||
|
allow_anonymous true
|
||||||
|
|
||||||
|
## Logging - possibilities: error, warning, notice, information, all
|
||||||
|
log_type warning
|
||||||
|
|
12
mqtt/config_templates/protected/mosquitto.conf
Normal file
12
mqtt/config_templates/protected/mosquitto.conf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
listener 1883
|
||||||
|
persistence true
|
||||||
|
persistence_location /mosquitto/data/
|
||||||
|
|
||||||
|
## Authentication ##
|
||||||
|
# Create passwd file: mosquitto_passwd -c /mosquitto/config/passwd <user_name>
|
||||||
|
# You need to make down && make up to use the new passwd file
|
||||||
|
password_file /mosquitto/config/passwd
|
||||||
|
|
||||||
|
## Logging - possibilities: error, warning, notice, information, all
|
||||||
|
log_type warning
|
||||||
|
|
0
mqtt/config_templates/protected/passwd
Normal file
0
mqtt/config_templates/protected/passwd
Normal file
19
mqtt/docker-compose.template
Normal file
19
mqtt/docker-compose.template
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#version: '3'
|
||||||
|
#services:
|
||||||
|
|
||||||
|
mqtt:
|
||||||
|
build: mqtt
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: /home/dirk/tmp/mqtt/
|
||||||
|
target: /mosquitto/
|
||||||
|
ports:
|
||||||
|
- target: 1883
|
||||||
|
published: 1883
|
||||||
|
protocol: tcp
|
||||||
|
mode: host
|
||||||
|
- target: 9001
|
||||||
|
published: 9001
|
||||||
|
protocol: tcp
|
||||||
|
mode: host
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user