Browse Source

added docker-compose config to setup mqtt broker for user testing

https://github.com/fphammerle/switchbot-mqtt/commit/d82784cb9f0d62e2cd484bd01401412bc568472d
Fabian Peter Hammerle 4 years ago
parent
commit
f16c50a62b
1 changed files with 21 additions and 0 deletions
  1. 21 0
      tests/.user/docker-compose.yml

+ 21 - 0
tests/.user/docker-compose.yml

@@ -0,0 +1,21 @@
+version: '2.2'
+
+networks:
+  default:
+    driver_opts:
+      com.docker.network.bridge.name: itr-cc1101-mqtt
+
+services:
+  broker:
+    # v2 binds to loopback device
+    # https://github.com/eclipse/mosquitto/blob/v2.0.0/ChangeLog.txt#L6
+    image: docker.io/eclipse-mosquitto:1.6
+    user: mosquitto
+    read_only: yes
+    ports: ['127.0.0.1:1883:1883/tcp']
+    cap_drop: [all]
+    security_opt: [no-new-privileges]
+    cpus: 0.4
+    mem_limit: 32M
+
+# https://docs.docker.com/compose/compose-file/compose-file-v2/