name: robot-market-mqtt5-test services: broker: image: eclipse-mosquitto:2.1.2-alpine@sha256:38c0da4f2ef84284d47b3b3eeea1cb3bdeabe81ee10caf0cd5c5ff61ee3ea408 user: "${BROKER_UID:-1883}:${BROKER_GID:-1883}" entrypoint: ["/usr/sbin/mosquitto"] command: ["-c", "/mosquitto/config/mosquitto.conf"] restart: unless-stopped stop_grace_period: 30s ports: - "${TLS_BIND_IP:-0.0.0.0}:${TLS_PORT:-8884}:8883" volumes: - type: bind source: ./mosquitto.conf target: /mosquitto/config/mosquitto.conf read_only: true bind: create_host_path: false - type: bind source: ./acl target: /mosquitto/config/acl read_only: true bind: create_host_path: false - type: bind source: ./secrets/runtime target: /run/mqtt-secrets read_only: true bind: create_host_path: false - type: bind source: ./certs/server target: /mosquitto/certs read_only: true bind: create_host_path: false - type: bind source: ./data target: /mosquitto/data bind: create_host_path: false - type: bind source: ./scripts/healthcheck.sh target: /usr/local/bin/mqtt-healthcheck read_only: true bind: create_host_path: false read_only: true tmpfs: - /tmp:rw,noexec,nosuid,size=8m,mode=1777 - /mosquitto/log:rw,noexec,nosuid,size=1m,mode=1777 cap_drop: [ALL] security_opt: [no-new-privileges:true] mem_limit: 256m cpus: 0.5 pids_limit: 64 logging: driver: json-file options: max-size: "5m" max-file: "3" healthcheck: test: ["CMD", "/bin/sh", "/usr/local/bin/mqtt-healthcheck"] interval: 30s timeout: 20s start_period: 10s retries: 3