HomeAssistant: Add zigbee2mqtt

This commit is contained in:
GHOSCHT 2024-12-25 16:33:10 +01:00
parent 17e3cca037
commit 02adc74c5a
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

View file

@ -30,5 +30,47 @@
"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"
];
};
};
}