version: '3.9'
services:
  mosquitto:
    image: eclipse-mosquitto:2
    volumes:
    - /home/jonathan/mosquitto/config:/mosquitto/config:ro
    - /home/jonathan/mosquitto/data:/mosquitto/data
    - /home/jonathan/mosquitto/log:/mosquitto/log
    networks:
    - caddy-public
    ports:
    - target: 1883
      published: 1883
      mode: host
    deploy:
      replicas: 1
      placement:
        constraints:
        - node.labels.role==db
networks:
  caddy-public:
    external: true
secrets: {}
