mosquitto: 6.0.0 (#2007)

This commit is contained in:
Franck Nijhof
2021-05-19 08:31:32 +02:00
committed by GitHub
parent 14cbbc63fc
commit 54ce6a1922
17 changed files with 349 additions and 376 deletions

View File

@@ -0,0 +1,67 @@
protocol mqtt
user root
log_dest stdout
log_type error
log_type warning
log_type notice
log_type information
persistence true
persistence_location /data/
# Authentication plugin
auth_plugin /usr/share/mosquitto/auth-plug.so
auth_opt_backends files,http
auth_opt_cache true
auth_opt_auth_cacheseconds 300
auth_opt_auth_cachejitter 30
auth_opt_acl_cacheseconds 300
auth_opt_acl_cachejitter 30
auth_opt_log_quiet true
# HTTP backend for the authentication plugin
auth_opt_password_file /etc/mosquitto/pw
auth_opt_acl_file /etc/mosquitto/acl
# HTTP backend for the authentication plugin
auth_opt_http_ip 127.0.0.1
auth_opt_http_port 80
auth_opt_http_getuser_uri /authentication
auth_opt_http_superuser_uri /superuser
auth_opt_http_aclcheck_uri /acl
{{ if .customize }}
include_dir /share/{{ .customize_folder }}
{{ end }}
listener 1883
protocol mqtt
listener 1884
protocol websockets
{{ if .ssl }}
# Follow SSL listener if a certificate exists
listener 8883
protocol mqtt
{{ if .cafile }}
cafile {{ .cafile }}
{{ else }}
cafile {{ .certfile }}
{{ end }}
certfile {{ .certfile }}
keyfile {{ .keyfile }}
require_certificate {{ .require_certificate }}
listener 8884
protocol websockets
{{ if .cafile }}
cafile {{ .cafile }}
{{ else }}
cafile {{ .certfile }}
{{ end }}
certfile {{ .certfile }}
keyfile {{ .keyfile }}
require_certificate {{ .require_certificate }}
{{ end }}

View File

@@ -0,0 +1,49 @@
# Run nginx in foreground.
daemon off;
# This is run inside Docker.
user root;
# Pid storage location.
pid /var/run/nginx.pid;
# Set number of worker processes.
worker_processes 1;
# Write error log to the add-on log.
error_log /proc/1/fd/1 error;
# Max num of simultaneous connections by a worker process.
events {
worker_connections 64;
}
http {
access_log off;
gzip off;
keepalive_timeout 65;
server_tokens off;
tcp_nodelay on;
tcp_nopush on;
server {
listen 127.0.0.1:80 default_server;
server_name _;
keepalive_timeout 5;
root /dev/null;
location /authentication {
proxy_set_header X-Supervisor-Token "{{ env "SUPERVISOR_TOKEN" }}";
proxy_pass http://supervisor/auth;
}
location = /superuser {
return 200;
}
location = /acl {
return 200;
}
}
}