version: '3' services: ddns: build: context: ./ddns/docker env_file: ./ddns/settings/token.env environment: - SUBDOMAIN="home-fnv" restart: always healthcheck: # нет HTTP-порта, сервис — вечный цикл run.sh с sleep 5m между обновлениями test: ["CMD-SHELL", "pgrep -f run.sh || exit 1"] interval: 1m timeout: 5s retries: 3 logging: driver: json-file options: max-size: "10m" max-file: "3" mosquitto: build: ./mosquitto/docker container_name: mosquitto env_file: ./mosquitto/settings/mqtt.env ports: - "1883:1883" restart: always healthcheck: # auth включена (MQTT_USERNAME/PASSWORD из env_file), проверяем publish под теми же кредами test: ["CMD-SHELL", "mosquitto_pub -h localhost -t healthcheck -m ping -u \"$$MQTT_USERNAME\" -P \"$$MQTT_PASSWORD\" -q 0"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: 50m postgres: image: postgres:16.1 restart: always volumes: - ./postgres/settings/data:/var/lib/postgresql/data env_file: ./postgres/settings/postgres.env healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: 50m hass: image: "homeassistant/home-assistant:stable" #2026.4.2 #image: ghcr.io/home-assistant/home-assistant:stable container_name: hass volumes: - ./hass/settings:/config - /dev/hass-wolpipe:/dev/hass-wolpipe - ./secrets/hass-fnv/settings/secrets.yaml:/config/secrets.yaml:ro - /etc/localtime:/etc/localtime:ro ports: - "8123:8123" # - "29898:9898/udp" # - "24321:4321/udp" # - "251827:51827" #Homekit devices: - "/dev/ttyUSB0:/dev/ttyUSB0" depends_on: - mosquitto - postgres #network_mode: "host" #privileged: true restart: always healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8123"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: 50m appdaemon: build: context: ./appdaemon/docker container_name: appdaemon depends_on: - hass volumes: - ./appdaemon/settings:/conf - ./secrets/hass-fnv/settings/secrets.yaml:/conf/secrets.yaml:ro - /etc/localtime:/etc/localtime:ro restart: always links: - "hass" healthcheck: # http: (dashboard) не включён в appdaemon.yaml -> HTTP-порта нет, проверяем процесс test: ["CMD-SHELL", "pgrep -f 'appdaemon' || exit 1"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: "10m" max-file: "5" node-red: build: context: ./node-red/docker #image: nodered/node-red:latest environment: - TZ=Europe/Moscow ports: - "1880:1880" depends_on: - hass restart: always volumes: - ./node-red/settings/data:/data healthcheck: test: ["CMD", "curl", "-f", "http://localhost:1880/"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: "10m" max-file: "3" esphome: image: esphome/esphome:latest #2025.6 #esphome-armv7 container_name: esphome ports: - "6052:6052" volumes: - ./esphome/settings:/config - ./secrets/hass-fnv/settings/secrets.yaml:/config/secrets.yaml:ro #devices: # - "/dev/ttyUSB0:/dev/ttyUSB0" #network_mode: host healthcheck: test: ["CMD", "curl", "-f", "http://localhost:6052/"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: "10m" max-file: "5" zigbee2mqtt: image: koenkk/zigbee2mqtt:latest #тут отваливается замок, поэтому не latest container_name: zigbee2mqtt ports: - "8080:8080" volumes: - ./zigbee2mqtt/settings:/app/data healthcheck: # в образе нет curl (Alpine), используем wget --spider test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080"] interval: 30s timeout: 10s retries: 6 start_period: 60s restart: always logging: driver: json-file options: max-size: 50m # DISABLED 2026-07-14: migrated to neptun_smart_local HA integration, see neptun-migration-backup-* # neptun2mqtt: # build: # context: ./neptun2mqtt/docker # dockerfile: Dockerfile # restart: always # container_name: neptun2mqtt # env_file: ./neptun2mqtt/settings/neptun.env # logging: # driver: json-file # options: # max-size: "10m" # max-file: "5" nginx: image: nginx hostname: nginx container_name: nginx links: - "hass" - "certbot" volumes: - ./nginx/settings/site-confs:/etc/nginx/conf.d - ./certbot/settings/data:/config/keys ports: - "80:80" - "443:443" restart: always healthcheck: # без -f: бэкенд (hass) может честно вернуть не-2xx (напр. untrusted proxy), # нас интересует только что nginx сам жив и отвечает на TCP/HTTP test: ["CMD-SHELL", "curl -s -o /dev/null http://localhost/ || exit 1"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: "10m" max-file: "5" certbot: build: context: ./certbot/docker dockerfile: Dockerfile restart: always container_name: certbot volumes: - ./certbot/docker/update_certs.sh:/update_certs.sh:ro - ./certbot/settings/data:/etc/letsencrypt - /etc/localtime:/etc/localtime:ro ports: - "8081:80" #entrypoint: certbot #command: certonly --standalone --agree-tos --non-interactive --email admin@yandex5.ru -d gitea.yandex5.ru healthcheck: # standalone-сервер поднимается только на момент renew раз в сутки, # 8081 в остальное время не слушает -> проверяем сам цикл update_certs.sh test: ["CMD-SHELL", "pgrep -f update_certs.sh || exit 1"] interval: 1m timeout: 5s retries: 3 logging: driver: json-file options: max-size: "10m" max-file: "5" #homeconnect2mqtt: # build: # context: ./homeconnect2mqtt/docker # dockerfile: Dockerfile # restart: always # container_name: homeconnect2mqtt # ports: # - "5001:5000" # env_file: ./homeconnect2mqtt/settings/homeconnect2mqtt.env # volumes: # - ./homeconnect2mqtt/settings/config.json:/app/config.json:ro # logging: # driver: json-file # options: # max-size: "10m" # max-file: "5" matter-bridge: image: ghcr.io/t0bst4r/home-assistant-matter-hub:latest container_name: matter-bridge ports: - "8482:8482" - "5353:5353" - "5540:5540" - "5541:5541" volumes: - ./matter-bridge/settings/data:/data - ./secrets/hass-fnv/settings/secrets.yaml:/config/secrets.yaml:ro env_file: ./matter-bridge/settings/matter-bridge.env network_mode: host healthcheck: # в образе нет curl/wget, только nc — TCP-проверка порта веб-UI test: ["CMD-SHELL", "nc -z -w2 localhost 8482 || exit 1"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: "10m" max-file: "5" keenetic: build: context: ./keenetic/docker dockerfile: Dockerfile container_name: keenetic restart: unless-stopped ports: - "8001:8000" env_file: ./keenetic/settings/keenetic.env healthcheck: # в образе только python3 (нет curl/wget), используем встроенный /health FastAPI-роут test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=5)"] interval: 30s timeout: 10s retries: 6 logging: driver: json-file options: max-size: "10m" max-file: "3"