From fdd4b6faf18ed856ed8e3b3e9fd809ef8794dfb0 Mon Sep 17 00:00:00 2001 From: Florian Zirker Date: Tue, 8 Oct 2024 13:18:15 +0200 Subject: [PATCH] mqtt and zigbee non host mode --- proxy/docker-compose.yaml | 6 +++--- smartHome/docker-compose.yaml | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/proxy/docker-compose.yaml b/proxy/docker-compose.yaml index 9600d1d..f5f3606 100644 --- a/proxy/docker-compose.yaml +++ b/proxy/docker-compose.yaml @@ -19,7 +19,7 @@ services: - "traefik.http.services.traefik.loadbalancer.server.port=8080" - "docker.group=proxy" extra_hosts: - - host.docker.internal:172.17.0.1 + - host.docker.internal:host-gateway depends_on: - docker-socket-proxy @@ -27,12 +27,12 @@ services: docker-socket-proxy: image: tecnativa/docker-socket-proxy restart: unless-stopped - volumes: + volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: # grant privileges as environment variables: https://github.com/Tecnativa/docker-socket-proxy#grant-or-revoke-access-to-certain-api-sections - CONTAINERS=1 - - INFO=1 + - INFO=1 networks: - dockersocket privileged: true diff --git a/smartHome/docker-compose.yaml b/smartHome/docker-compose.yaml index 52b697a..913fc64 100644 --- a/smartHome/docker-compose.yaml +++ b/smartHome/docker-compose.yaml @@ -16,14 +16,14 @@ services: - "traefik.http.services.hassi.loadbalancer.server.port=8123" - "docker.group=smartHome" + mqttbroker: image: eclipse-mosquitto:${MOSQUITTO_VERSION} restart: unless-stopped - network_mode: host - expose: - - 1883 - #ports: - # - 1883:1883 # mqtt over TCP + networks: + - smarthome + ports: + - 1883:1883 # mqtt over TCP # - 9001:9001 # Websockets volumes: - ./mosquitto.conf:/mosquitto/config/mosquitto.conf @@ -43,6 +43,7 @@ services: - ${ZIGBEE_DEVICE}:/dev/ttyACM0 networks: - web + - smarthome labels: - "traefik.enable=true" - "traefik.http.routers.zigbee2mqtt.rule=Host(`zigbee2mqtt.${DOMAIN}`)" @@ -54,3 +55,4 @@ services: networks: web: external: true + smarthome: