You've already forked docker-compose-nas
mirror of
https://github.com/AdrienPoupa/docker-compose-nas.git
synced 2025-11-29 05:36:48 +02:00
86 lines
2.6 KiB
YAML
86 lines
2.6 KiB
YAML
services:
|
|
homeassistant:
|
|
image: ghcr.io/home-assistant/home-assistant:stable
|
|
container_name: homeassistant
|
|
network_mode: host
|
|
environment:
|
|
- PUID=${USER_ID}
|
|
- PGID=${GROUP_ID}
|
|
- TZ=${TIMEZONE}
|
|
volumes:
|
|
- ${CONFIG_ROOT:-.}/homeassistant:/config
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /run/dbus:/run/dbus:ro
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "curl", "--fail", "http://127.0.0.1:8123"]
|
|
interval: 1m
|
|
retries: 10
|
|
privileged: true
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.homeassistant.rule=(Host(`${HOMEASSISTANT_HOSTNAME}`))
|
|
- traefik.http.routers.homeassistant.tls=true
|
|
- traefik.http.routers.homeassistant.tls.certresolver=myresolver
|
|
- traefik.http.services.homeassistant.loadbalancer.server.port=8123
|
|
- homepage.group=Apps
|
|
- homepage.name=Home Assistant
|
|
- homepage.icon=home-assistant.png
|
|
- homepage.href=https://${HOMEASSISTANT_HOSTNAME}
|
|
- homepage.description=Open source home automation that puts local control and privacy first
|
|
- homepage.weight=3
|
|
- homepage.widget.type=homeassistant
|
|
- homepage.widget.url=https://${HOMEASSISTANT_HOSTNAME}
|
|
- homepage.widget.key=${HOMEASSISTANT_ACCESS_TOKEN}
|
|
profiles:
|
|
- homeassistant
|
|
mosquitto:
|
|
container_name: mosquitto
|
|
image: public.ecr.aws/docker/library/eclipse-mosquitto:latest
|
|
restart: always
|
|
user: ${USER_ID}:${GROUP_ID}
|
|
environment:
|
|
- PUID=${USER_ID}
|
|
- PGID=${GROUP_ID}
|
|
volumes:
|
|
- ${CONFIG_ROOT:-.}/homeassistant/mosquitto/config:/mosquitto/config
|
|
- ${CONFIG_ROOT:-.}/homeassistant/mosquitto/data:/mosquitto/data
|
|
- ${CONFIG_ROOT:-.}/homeassistant/mosquitto/log:/mosquitto/log
|
|
ports:
|
|
- "1883:1883"
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"mosquitto_sub",
|
|
"-p",
|
|
"1880",
|
|
"-t",
|
|
"$$SYS/#",
|
|
"-C",
|
|
"1",
|
|
"-i",
|
|
"healthcheck",
|
|
"-W",
|
|
"3",
|
|
]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
profiles:
|
|
- mqtt
|
|
homeassistant-backup:
|
|
image: ghcr.io/adrienpoupa/rclone-backup:latest
|
|
container_name: homeassistant-backup
|
|
restart: always
|
|
env_file:
|
|
- ${CONFIG_ROOT:-.}/homeassistant/backup.env
|
|
environment:
|
|
- BACKUP_FOLDER_NAME=backups
|
|
- BACKUP_FOLDER_PATH=/backups
|
|
volumes:
|
|
- ${CONFIG_ROOT:-.}/homeassistant/backups:/backups
|
|
- ${CONFIG_ROOT:-.}/homeassistant/backup:/config
|
|
profiles:
|
|
- homeassistant
|