HomeAssistant: Add zigbee2mqtt
This commit is contained in:
parent
17e3cca037
commit
02adc74c5a
1 changed files with 42 additions and 0 deletions
|
@ -30,5 +30,47 @@
|
||||||
"dmz"
|
"dmz"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
mosquitto.service = {
|
||||||
|
image = "eclipse-mosquitto:2.0.20";
|
||||||
|
volumes = [
|
||||||
|
"/home/ghoscht/.docker/smarthome/mosquitto_config:/mosquitto/config"
|
||||||
|
"/home/ghoscht/.docker/smarthome/mosquitto_data:/mosquitto/data"
|
||||||
|
];
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.mqtt.entrypoints" = "websecure";
|
||||||
|
"traefik.http.routers.mqtt.rule" = "Host(`mqtt.ghoscht.com`)";
|
||||||
|
"traefik.http.routers.mqtt.tls" = "true";
|
||||||
|
"traefik.http.routers.mqtt.tls.certresolver" = "letsencrypt";
|
||||||
|
"traefik.http.services.mqtt.loadbalancer.server.port" = "1883";
|
||||||
|
};
|
||||||
|
restart = "always";
|
||||||
|
command = "mosquitto -c /mosquitto-no-auth.conf";
|
||||||
|
networks = [
|
||||||
|
"dmz"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
zigbee2mqtt.service = {
|
||||||
|
image = "koenkk/zigbee2mqtt:1.42.0";
|
||||||
|
volumes = [
|
||||||
|
"/home/ghoscht/.docker/smarthome/zigbee2mqtt_data:/app/data"
|
||||||
|
"/run/udev:/run/udev:ro"
|
||||||
|
];
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.zigbee2mqtt.entrypoints" = "websecure";
|
||||||
|
"traefik.http.routers.zigbee2mqtt.rule" = "Host(`zigbee2mqtt.ghoscht.com`)";
|
||||||
|
"traefik.http.routers.zigbee2mqtt.tls" = "true";
|
||||||
|
"traefik.http.routers.zigbee2mqtt.tls.certresolver" = "letsencrypt";
|
||||||
|
"traefik.http.services.zigbee2mqtt.loadbalancer.server.port" = "8080";
|
||||||
|
};
|
||||||
|
devices = [
|
||||||
|
"/dev/ttyUSB0:/dev/ttyUSB0"
|
||||||
|
];
|
||||||
|
restart = "always";
|
||||||
|
networks = [
|
||||||
|
"dmz"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue