From d659ea1a6c99d6dcfcafdeaf67d450f5855a59dc Mon Sep 17 00:00:00 2001 From: sickprodigy Date: Fri, 21 Nov 2025 19:03:42 -0500 Subject: [PATCH] Add docker-compose configuration for Home Assistant and Mosquitto services --- homeassistant/docker-compose.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 homeassistant/docker-compose.yml diff --git a/homeassistant/docker-compose.yml b/homeassistant/docker-compose.yml new file mode 100644 index 0000000..8a7f4e3 --- /dev/null +++ b/homeassistant/docker-compose.yml @@ -0,0 +1,37 @@ +version: '2.1' +services: + homeassistant: + container_name: homeassistant + image: "ghcr.io/home-assistant/home-assistant:stable" + volumes: + - /docker-containers/homeassistant:/config + - /etc/localtime:/etc/localtime:ro + restart: unless-stopped +# depends_on: +# - mosquitto + privileged: true + stdin_open: true # to attach to containers + tty: true # also used to attach to containers + networks: # Specify network for container + - homelab + + mosquitto: + container_name: mosquitto + image: eclipse-mosquitto + restart: unless-stopped + ports: + - "1883:1883/tcp" + environment: + - TZ=American/New_York + volumes: + - /docker-containers/mosquitto-eclipse:/mosquitto/config + - /docker-containers/mosquitto-eclipse/data:/mosquitto/data + - /docker-containers/mosquitto-eclipse/log:/mosquitto/log + stdin_open: true # to attach to containers + tty: true # also used to attach to containers +# network_mode: service:wireguard # To run through vpn service container, in turn UI port must be forwarded inside vpn. No local access unless otherwise defined + networks: # Specify network for container + - homelab +networks: # I don't know why but you have to specify the network 2x. In service, and in this tag area.. + homelab: + external: true # This option causes compose to join the above network instead of making a _default one \ No newline at end of file