services: homeassistant: container_name: homeassistant image: "ghcr.io/home-assistant/home-assistant:stable" environment: VIRTUAL_HOST: "ha.domain.ru" LETSENCRYPT_HOST: "ha.domain.ru" LETSENCRYPT_EMAIL: "my@email.ru" # Можно добавить, если требуется указать внутренний порт: # VIRTUAL_PORT: "8123" expose: - "8123" volumes: - ha:/config - /etc/localtime:/etc/localtime:ro - /run/dbus:/run/dbus:ro restart: unless-stopped privileged: true networks: - "net" deploy: resources: limits: memory: 1G # жёсткий лимит RAM cpus: '1.0' # максимум 1 ядро CPU reservations: memory: 512M # гарантированный минимум RAM cpus: '0.5' # минимум 0.5 ядра CPU networks: net: external: true volumes: ha: driver: local driver_opts: type: none device: /mnt/ha o: bind