From aa0a7686af984c9bb8b6ef3d6d616c1446daf4e8 Mon Sep 17 00:00:00 2001 From: Simon Milvert Date: Thu, 13 Aug 2020 20:58:37 +0200 Subject: [PATCH] Modify mosquitto --- docker-compose.yml | 9 +++++++-- mosquitto/mosquitto.conf | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d5a08ea..f50dc74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,9 @@ services: - 8384:8384 - 22000:22000 - 21027:21027/udp + networks: + - frontend + - backend restart: unless-stopped milvert-nginx: @@ -91,7 +94,7 @@ services: - INFLUXDB_ADMIN_PASSWORD=SECURE_PASS gitea: - image: gitea/gitea:1.9.3 + image: gitea/gitea:1.12 container_name: gitea networks: - backend @@ -144,7 +147,9 @@ services: - PGID=1000 - TZ=Europe/Stockholm volumes: - - ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf + - ./mosquitto/mosquitto.conf:/mqtt/mosquitto.conf + - ${DIR}/mqtt/data:/mqtt/data + - ${DIR}/mqtt/log:/mqtt/log labels: - "traefik.http.routers.mqtt.rule=Host(`mqtt.${DOMAIN}`)" - "traefik.http.routers.mqtt.entrypoints=mqtt" diff --git a/mosquitto/mosquitto.conf b/mosquitto/mosquitto.conf index 374faa5..b983dd9 100644 --- a/mosquitto/mosquitto.conf +++ b/mosquitto/mosquitto.conf @@ -1,7 +1,18 @@ -persistence true -persistence_location /mosquitto/data/ -log_dest file /mosquitto/log/mosquitto.log +pid_file /var/run/mosquitto.pid +persistence true +persistence_location /mqtt/data/ + +user mosquitto + +# Port to use for the default listener. +port 1883 + + +log_dest file /mqtt/log/mosquitto.log +log_dest stdout + +include_dir /mqtt/config listener 1883