Add own certs to mosquitto

This commit is contained in:
Ruakij 2022-10-21 14:48:29 +02:00
parent 806b41b73e
commit d553f604a9
3 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,9 @@
per_listener_settings false
listener 8883
allow_anonymous false
certfile /certs/node.crt
keyfile /certs/node.key
listener 1883
allow_anonymous false

View File

@ -1,6 +1,7 @@
- name: Generate PrivateKey
community.crypto.openssl_privatekey:
path: /opt/netmaker_server/certs/node.key
owner: 1883 # Set owner to mosquitto-user (all other containers seem to run as root)
- name: Generate Certificate-Signing-Request from privateKey
community.crypto.openssl_csr:

View File

@ -123,6 +123,7 @@ services:
- ./mosquitto/config:/mosquitto/config
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/logs:/mosquitto/log
- "./certs:/certs:ro"
depends_on:
- netmaker
command: ["/mosquitto/config/wait.sh"]