services:
  mosquitto:
    volumes:
      - ./mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
      - /opt/homelab/data/mosquitto/config/password.txt:/mosquitto/config/password.txt:ro
    # Healthcheck compatibility
    healthcheck:
      test: ["CMD-SHELL", "mosquitto_sub -t '$SYS/broker/version' -C 1 || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 5
