172 lines
5.7 KiB
YAML
172 lines
5.7 KiB
YAML
services:
|
|
# **************
|
|
# homeassistant
|
|
# **************
|
|
homeassistant:
|
|
container_name: homeassistant
|
|
image: ghcr.io/home-assistant/home-assistant:stable
|
|
restart: unless-stopped
|
|
# Use Host network mode - allows access to local network devices and services directly; no ports or networks in host mode
|
|
# Home Assistant relies heavily on network discovery protocols (mDNS, SSDP, Bluetooth, Zigbee over IP, etc.) that don't work reliably through Docker's NAT bridge
|
|
# Without host networking, devices on your LAN may fail to be discovered automatically
|
|
network_mode: host
|
|
privileged: false
|
|
# Bluetooth, USB and any other devices must be mapped as volumes or devices for the host hardware
|
|
# Directly map any devices this container needs access to (zigbee, etc)
|
|
devices:
|
|
- /dev/ttyUSB0:/dev/ttyUSB0
|
|
# NOTE: Home Assistant requires root inside the container and doesn't support running as an arbitrary non-root user
|
|
cap_drop:
|
|
- ALL # Drop all Linux capabilities...
|
|
cap_add: # ...add back only what's needed
|
|
- NET_BIND_SERVICE # Bind to ports below 1024
|
|
- NET_RAW # Needed for ping/presence detection
|
|
- NET_ADMIN # Needed for Bluetooth
|
|
security_opt:
|
|
- apparmor=unconfined # Needed for Bluetooth
|
|
volumes:
|
|
- /srv/docker/home/homeassistant:/config
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /run/dbus:/run/dbus:ro # Needed for bluetooth functionality
|
|
environment:
|
|
TZ: America/Chicago
|
|
labels:
|
|
- homepage.group=Home
|
|
- homepage.name=Homeassistant
|
|
- homepage.icon=homeassistant.png
|
|
- homepage.href=${HA_URL}
|
|
- homepage.description=Local git server
|
|
- homepage.widget.type=homeassistant
|
|
- homepage.widget.url=${HA_URL}
|
|
- homepage.widget.key=${HA_TOKEN}
|
|
- homepage.widget.fields=["people_home", "lights_on", "switches_on"]
|
|
- dockhand.url=${HA_URL}
|
|
- rackpeek.tags=homeassistant
|
|
|
|
# **************
|
|
# ha-mcp
|
|
# ***************
|
|
# https://github.com/homeassistant-ai/ha-mcp/blob/master/docker-compose.yml
|
|
# Connect your MCP client to the ha-mcp container
|
|
ha-mcp:
|
|
image: ghcr.io/homeassistant-ai/ha-mcp:latest
|
|
container_name: ha-mcp-server
|
|
restart: unless-stopped
|
|
#network_mode: host
|
|
command: ha-mcp-web
|
|
ports:
|
|
- "8076:8086"
|
|
networks:
|
|
- ollama-net
|
|
environment:
|
|
- HOMEASSISTANT_URL=${HA_IP}
|
|
- HOMEASSISTANT_TOKEN=${HA_TOKEN}
|
|
- BACKUP_HINT=normal # Optional: Configure backup hint behavior
|
|
- HAMCP_ENABLE_FILESYSTEM_TOOLS=true
|
|
- ENABLE_YAML_CONFIG_EDITING=true
|
|
- HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION=true
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp
|
|
cap_drop:
|
|
- ALL
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
labels:
|
|
# homepage labels used by rackpeek
|
|
- homepage.group=AI
|
|
- homepage.name=HA-MCP
|
|
- homepage.icon=mcp.png
|
|
- homepage.href=${HA_IP}/mcp
|
|
- homepage.description=MCP Server for Homeassistant
|
|
- dockhand.url=${HA_IP}/mcp
|
|
- rackpeek.tags=ai
|
|
|
|
# ***********************
|
|
# music-assistant
|
|
# ***********************
|
|
music-assistant:
|
|
container_name: music-assistant
|
|
image: ghcr.io/music-assistant/server:latest
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
volumes:
|
|
- /srv/docker/home/ha-addons/music-assistant:/data
|
|
environment:
|
|
- TZ=America/Chicago
|
|
privileged: false
|
|
cap_add:
|
|
- SYS_ADMIN
|
|
- DAC_READ_SEARCH
|
|
labels:
|
|
# homepage labels used by rackpeek
|
|
- homepage.group=Entertainment
|
|
- homepage.name=Music Assistant
|
|
- homepage.icon=music-assistant-light.png
|
|
- homepage.href=${MA_URL}
|
|
- homepage.description=Music Assistant for Homeassistant
|
|
- dockhand.url=${MA_URL}
|
|
- rackpeek.tags=entertainment
|
|
|
|
# ***********************
|
|
# code-server
|
|
# ***********************
|
|
code-server:
|
|
container_name: code-server
|
|
image: lscr.io/linuxserver/code-server:latest
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
environment:
|
|
- TZ=America/Chicago
|
|
- PUID=1001 # docker user
|
|
- PGID=1001 # docker group
|
|
- PASSWORD=${CODESERVER_PWD} # or use HASHED_PASSWORD
|
|
- DEFAULT_WORKSPACE=/config
|
|
volumes:
|
|
- /srv/docker/home/ha-addons/code-server:/config
|
|
- /srv/docker/home/homeassistant:/config/workspace/homeassistant
|
|
#connect any other volumes you wish to be able to access i.e. esphome, nodered, etc
|
|
privileged: false
|
|
labels:
|
|
# homepage labels used by rackpeek
|
|
- homepage.group=Development
|
|
- homepage.name=Code Server
|
|
- homepage.icon=code-server.png
|
|
- homepage.href=${CODESERVER_URL}
|
|
- homepage.description=Code Server for Homeassistant
|
|
- dockhand.url=${CODESERVER_URL}
|
|
- rackpeek.tags=development
|
|
|
|
# ***********************
|
|
# ESPHOME
|
|
# ***********************
|
|
esphome:
|
|
container_name: esphome
|
|
image: ghcr.io/esphome/esphome:latest
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
environment:
|
|
- TZ=America/Chicago
|
|
privileged: false
|
|
cap_add:
|
|
- NET_ADMIN
|
|
- NET_RAW
|
|
volumes:
|
|
- /srv/docker/home/ha-addons/esphome:/config
|
|
- /etc/localtime:/etc/localtime:ro
|
|
labels:
|
|
# homepage labels used by rackpeek
|
|
- homepage.group=Development
|
|
- homepage.name=ESPHome
|
|
- homepage.icon=esphome.png
|
|
- homepage.href=${ESPHOME_URL}
|
|
- homepage.description=Create custom sensors for Homeassistant
|
|
- dockhand.url=${ESPHOME_URL}
|
|
- rackpeek.tags=development
|
|
networks:
|
|
ollama-net:
|
|
external: true |