homeassistant #2

Merged
kevinheyer merged 2 commits from homeassistant into main 2025-03-16 21:54:14 +00:00
3 changed files with 62 additions and 0 deletions
Showing only changes of commit 9f723d9026 - Show all commits

View file

@ -0,0 +1,5 @@
# Homeassistant Version (Standard: latest)
HOMEASSISTANT_VERSION=latest
# Homeassistant Domain
HOMEASSISTANT_DOMAIN=Homeassistant.example.com

27
homeassistant/README.md Normal file
View file

@ -0,0 +1,27 @@
# HomeassistantDocker Deployment
This repository provides a `docker-compose` configuration for deploying the Homeassistant container, which is accessible via Traefik as a reverse proxy.
## Prerequisites
- Docker and Docker Compose must be installed
- Traefik must be set up as a reverse proxy
## Installation
1. **Configure the `.env` file**
Rename the `.env-example` file to `.env` and update the file with your specific values. This file contains environment variables used by the Traefik service.
```bash
mv .env-example .env
```
Modify the .env file
```
2. **Start Docker-Compose**
```sh
docker-compose up -d
```
## Access
Once the container is running, Homeassistant will be available at the configured domain.

View file

@ -0,0 +1,30 @@
---
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:${HOMEASSISTANT_VERSION:-latest}"
volumes:
- ./data/config:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
network_mode: host
environment:
- TZ=Europe/Rome
cap_add:
- NET_ADMIN
- NET_BIND_SERVICE
- SYS_ADMIN
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.homeassistant.entrypoints=http"
- "traefik.http.routers.homeassistant.rule=Host(`${HOMEASSISTANT_DOMAIN:?error}`)"
- "traefik.http.middlewares.homeassistant-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.homeassistant.middlewares=homeassistant-https-redirect"
- "traefik.http.routers.homeassistant-secure.entrypoints=https"
- "traefik.http.routers.homeassistant-secure.rule=Host(`${HOMEASSISTANT_DOMAIN:?error}`)"
- "traefik.http.routers.homeassistant-secure.tls=true"
- "traefik.http.routers.homeassistant-secure.service=homeassistant"
- "traefik.http.services.homeassistant.loadbalancer.server.port=8123"