test: mount mosquitto.conf to listen on all interfaces

This commit is contained in:
2025-12-28 15:19:23 +01:00
parent 79fcf7389f
commit 8fd9353068
2 changed files with 7 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ services:
volumes:
- mosquitto_data:/mosquitto/data
- mosquitto_log:/mosquitto/log
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
healthcheck:
test: ["CMD", "sh", "-c", "nc -z localhost 1883 || exit 1"]
interval: 2s

6
test/mosquitto.conf Normal file
View File

@@ -0,0 +1,6 @@
# Allow external connections on port 1883
listener 1883 0.0.0.0
allow_anonymous true
# Increase persistence location so container can map volume if needed
persistence true
persistence_location /mosquitto/data/