117 lines
3.1 KiB
YAML
117 lines
3.1 KiB
YAML
services:
|
|
mosquitto:
|
|
image: eclipse-mosquitto:latest
|
|
container_name: mosquitto
|
|
restart: always
|
|
user: "1883:1883"
|
|
ports:
|
|
- "1883:1883"
|
|
volumes:
|
|
- ./mosquitto/config:/mosquitto/config
|
|
- ./mosquitto/data:/mosquitto/data
|
|
- ./mosquitto/log:/mosquitto/log
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"mosquitto_pub",
|
|
"-p",
|
|
"1883",
|
|
"-t",
|
|
"healthcheck",
|
|
"-m",
|
|
"ok",
|
|
"-r",
|
|
"--quiet",
|
|
]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
zigbee2mqtt:
|
|
image: ghcr.io/pine64/zigbee2mqtt:latest-dev # BLZ fork, NOT koenkk
|
|
container_name: zigbee2mqtt
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- mosquitto
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./zigbee2mqtt:/app/data
|
|
devices:
|
|
- source: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
|
|
target: /dev/ttyUSB1
|
|
permissions: rw
|
|
entrypoint: ["/app/data/scripts/entrypoint.sh"]
|
|
command: ["/sbin/tini", "--", "node", "index.js"]
|
|
environment:
|
|
TZ: America/Los_Angeles
|
|
|
|
# govee2mqtt:
|
|
# image: ghcr.io/wez/govee2mqtt:latest
|
|
# container_name: govee2mqtt
|
|
# restart: unless-stopped
|
|
# network_mode: host
|
|
# environment:
|
|
# GOVEE_EMAIL: your@email.com
|
|
# GOVEE_PASSWORD: yourpassword
|
|
# GOVEE_API_KEY: your-api-key
|
|
# MQTT_HOST: 127.0.0.1
|
|
# TZ: America/Los_Angeles
|
|
#
|
|
nodered:
|
|
build: ./nodered
|
|
container_name: nodered
|
|
restart: unless-stopped
|
|
depends_on:
|
|
mosquitto:
|
|
condition: service_healthy
|
|
user: "1000:1000"
|
|
ports:
|
|
- "1880:1880"
|
|
volumes:
|
|
- ./nodered:/data # bind: settings.js, flows.json, start.sh, package.json
|
|
- /data/node_modules # anonymous: preserves build-time npm install
|
|
environment:
|
|
TZ: America/Los_Angeles
|
|
DASHBOARD_BASE_HREF: /dashboard/
|
|
command: ["sh", "/data/start.sh"]
|
|
|
|
# Listens to ntfy.sh for doorbell events and toggles a smart plug on each alert.
|
|
# Topic: ALERT_klubhaus_topic_test (matches ESP32 firmware DEBUG_MODE suffix)
|
|
# Action: TOGGLE on zigbee2mqtt/Squiggle/set
|
|
# On a fresh alert, flash the plug: N toggles spaced FLASH_INTERVAL_SECONDS
|
|
# so the total runtime is FLASH_DURATION_SECONDS.
|
|
meshtastic-mqtt:
|
|
image: eclipse-mosquitto:latest
|
|
container_name: meshtastic-mqtt
|
|
restart: unless-stopped
|
|
ports:
|
|
- "1884:1883"
|
|
volumes:
|
|
- ./meshtastic-mqtt:/mosquitto/config:ro
|
|
|
|
doorbell-listener:
|
|
build: ./doorbell-listener
|
|
container_name: doorbell-listener
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
depends_on:
|
|
mosquitto:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./doorbell-listener/state:/data/doorbell-listener
|
|
environment:
|
|
MQTT_HOST: 192.168.81.147
|
|
MQTT_PORT: "1883"
|
|
PLUG_TOPIC: "zigbee2mqtt/Squiggle/set"
|
|
POLL_INTERVAL: "5"
|
|
MAX_AGE_SECONDS: "180"
|
|
FLASH_INTERVAL_SECONDS: "1"
|
|
FLASH_DURATION_SECONDS: "7"
|
|
TZ: America/Los_Angeles
|
|
|
|
volumes:
|
|
librespot_cache:
|