Merge pull request #51 from AdrienPoupa/feat/homeassistant
feat(homeassistant): Add Home Assistant
This commit is contained in:
commit
e4f248ade6
@ -10,6 +10,7 @@ PIA_USER=
|
|||||||
PIA_PASS=
|
PIA_PASS=
|
||||||
PIA_LOCAL_NETWORK="192.168.0.0/16"
|
PIA_LOCAL_NETWORK="192.168.0.0/16"
|
||||||
HOSTNAME=localhost
|
HOSTNAME=localhost
|
||||||
|
HOMEASSISTANT_HOSTNAME=
|
||||||
ADGUARD_HOSTNAME=
|
ADGUARD_HOSTNAME=
|
||||||
ADGUARD_USERNAME=
|
ADGUARD_USERNAME=
|
||||||
ADGUARD_PASSWORD=
|
ADGUARD_PASSWORD=
|
||||||
@ -29,6 +30,7 @@ PROWLARR_API_KEY=
|
|||||||
JELLYFIN_API_KEY=
|
JELLYFIN_API_KEY=
|
||||||
JELLYSEERR_API_KEY=
|
JELLYSEERR_API_KEY=
|
||||||
SABNZBD_API_KEY=
|
SABNZBD_API_KEY=
|
||||||
|
HOMEASSISTANT_ACCESS_TOKEN=
|
||||||
HOMEPAGE_VAR_TITLE="Docker-Compose NAS"
|
HOMEPAGE_VAR_TITLE="Docker-Compose NAS"
|
||||||
HOMEPAGE_VAR_SEARCH_PROVIDER=google
|
HOMEPAGE_VAR_SEARCH_PROVIDER=google
|
||||||
HOMEPAGE_VAR_HEADER_STYLE=boxed
|
HOMEPAGE_VAR_HEADER_STYLE=boxed
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -17,7 +17,6 @@ docker-compose.override.yml
|
|||||||
/jellyseerr
|
/jellyseerr
|
||||||
/adguardhome/certs
|
/adguardhome/certs
|
||||||
/adguardhome/conf
|
/adguardhome/conf
|
||||||
!/adguardhome/conf/.gitkeep
|
|
||||||
/adguardhome/work
|
/adguardhome/work
|
||||||
!/adguardhome/work/.gitkeep
|
|
||||||
/sabnzbd
|
/sabnzbd
|
||||||
|
/homeassistant
|
||||||
|
23
README.md
23
README.md
@ -38,6 +38,7 @@ I am running it in Ubuntu Server 22.04; I also tested this setup on a [Synology
|
|||||||
* [Expose DNS Server with Tailscale](#expose-dns-server-with-tailscale)
|
* [Expose DNS Server with Tailscale](#expose-dns-server-with-tailscale)
|
||||||
* [Tandoor](#tandoor)
|
* [Tandoor](#tandoor)
|
||||||
* [Joplin](#joplin)
|
* [Joplin](#joplin)
|
||||||
|
* [Home Assistant](#home-assistant)
|
||||||
* [Customization](#customization)
|
* [Customization](#customization)
|
||||||
* [Optional: Using the VPN for *arr apps](#optional-using-the-vpn-for-arr-apps)
|
* [Optional: Using the VPN for *arr apps](#optional-using-the-vpn-for-arr-apps)
|
||||||
* [Synology Quirks](#synology-quirks)
|
* [Synology Quirks](#synology-quirks)
|
||||||
@ -55,7 +56,7 @@ I am running it in Ubuntu Server 22.04; I also tested this setup on a [Synology
|
|||||||
## Applications
|
## Applications
|
||||||
|
|
||||||
| **Application** | **Description** | **Image** | **URL** |
|
| **Application** | **Description** | **Image** | **URL** |
|
||||||
|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|--------------|
|
|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|--------------|
|
||||||
| [Sonarr](https://sonarr.tv) | PVR for newsgroup and bittorrent users | [linuxserver/sonarr](https://hub.docker.com/r/linuxserver/sonarr) | /sonarr |
|
| [Sonarr](https://sonarr.tv) | PVR for newsgroup and bittorrent users | [linuxserver/sonarr](https://hub.docker.com/r/linuxserver/sonarr) | /sonarr |
|
||||||
| [Radarr](https://radarr.video) | Movie collection manager for Usenet and BitTorrent users | [linuxserver/radarr](https://hub.docker.com/r/linuxserver/radarr) | /radarr |
|
| [Radarr](https://radarr.video) | Movie collection manager for Usenet and BitTorrent users | [linuxserver/radarr](https://hub.docker.com/r/linuxserver/radarr) | /radarr |
|
||||||
| [Prowlarr](https://github.com/Prowlarr/Prowlarr) | Indexer aggregator for Sonarr and Radarr | [linuxserver/prowlarr:latest](https://hub.docker.com/r/linuxserver/prowlarr) | /prowlarr |
|
| [Prowlarr](https://github.com/Prowlarr/Prowlarr) | Indexer aggregator for Sonarr and Radarr | [linuxserver/prowlarr:latest](https://hub.docker.com/r/linuxserver/prowlarr) | /prowlarr |
|
||||||
@ -74,6 +75,7 @@ I am running it in Ubuntu Server 22.04; I also tested this setup on a [Synology
|
|||||||
| [AdGuard Home](https://adguard.com/en/adguard-home/overview.html) | Optional - Network-wide software for blocking ads & tracking<br/>Enable with `COMPOSE_PROFILES=adguardhome` | [adguard/adguardhome](https://hub.docker.com/r/adguard/adguardhome) | |
|
| [AdGuard Home](https://adguard.com/en/adguard-home/overview.html) | Optional - Network-wide software for blocking ads & tracking<br/>Enable with `COMPOSE_PROFILES=adguardhome` | [adguard/adguardhome](https://hub.docker.com/r/adguard/adguardhome) | |
|
||||||
| [Tandoor](https://tandoor.dev) | Optional - Smart recipe management<br/>Enable with `COMPOSE_PROFILES=tandoor` | [vabene1111/recipes](https://hub.docker.com/r/vabene1111/recipes) | /recipes |
|
| [Tandoor](https://tandoor.dev) | Optional - Smart recipe management<br/>Enable with `COMPOSE_PROFILES=tandoor` | [vabene1111/recipes](https://hub.docker.com/r/vabene1111/recipes) | /recipes |
|
||||||
| [Joplin](https://joplinapp.org/) | Optional - Note taking application<br/>Enable with `COMPOSE_PROFILES=joplin` | [joplin/server](https://hub.docker.com/r/joplin/server) | /joplin |
|
| [Joplin](https://joplinapp.org/) | Optional - Note taking application<br/>Enable with `COMPOSE_PROFILES=joplin` | [joplin/server](https://hub.docker.com/r/joplin/server) | /joplin |
|
||||||
|
| [Home Assistant](https://www.home-assistant.io/) | Optional - Open source home automation that puts local control and privacy first<br/>Enable with `COMPOSE_PROFILES=homeassistant` | [home-assistant/home-assistant:stable](https://ghcr.io/home-assistant/home-assistant) | |
|
||||||
|
|
||||||
Optional containers are not enabled by default, they need to be enabled,
|
Optional containers are not enabled by default, they need to be enabled,
|
||||||
see [Optional Services](#optional-services) for more information.
|
see [Optional Services](#optional-services) for more information.
|
||||||
@ -378,6 +380,25 @@ See [here](./tandoor/README.md).
|
|||||||
|
|
||||||
See [here](./joplin/README.md).
|
See [here](./joplin/README.md).
|
||||||
|
|
||||||
|
### Home Assistant
|
||||||
|
|
||||||
|
Enable Home Assistant by setting `COMPOSE_PROFILES=homeassistant`.
|
||||||
|
|
||||||
|
Set the `HOMEASSISTANT_HOSTNAME`, since it does not support
|
||||||
|
[running in a subfolder](https://github.com/home-assistant/architecture/issues/156).
|
||||||
|
Add the necessary DNS records in your domain.
|
||||||
|
|
||||||
|
You will need to allow Traefik to access Home Assistant by adding the following in `homeassistant/configuration.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
http:
|
||||||
|
use_x_forwarded_for: true
|
||||||
|
trusted_proxies:
|
||||||
|
- 172.0.0.0/8 # You can put a more precise range instead
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the `HOMEASSISTANT_ACCESS_TOKEN` for homepage support.
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
You can override the configuration of a service or add new services by creating a new `docker-compose.override.yml` file,
|
You can override the configuration of a service or add new services by creating a new `docker-compose.override.yml` file,
|
||||||
|
@ -33,6 +33,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/letsencrypt
|
- ./letsencrypt:/letsencrypt
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
|
extra_hosts:
|
||||||
|
- host.docker.internal:172.17.0.1
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "traefik", "healthcheck", "--ping" ]
|
test: [ "CMD", "traefik", "healthcheck", "--ping" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
@ -401,6 +403,41 @@ services:
|
|||||||
- homepage.widget.type=jellyfin
|
- homepage.widget.type=jellyfin
|
||||||
- homepage.widget.url=http://jellyfin:8096/jellyfin
|
- homepage.widget.url=http://jellyfin:8096/jellyfin
|
||||||
- homepage.widget.key=${JELLYFIN_API_KEY}
|
- homepage.widget.key=${JELLYFIN_API_KEY}
|
||||||
|
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:
|
||||||
|
- ./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: 5s
|
||||||
|
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
|
||||||
homepage:
|
homepage:
|
||||||
image: ghcr.io/gethomepage/homepage:latest
|
image: ghcr.io/gethomepage/homepage:latest
|
||||||
container_name: homepage
|
container_name: homepage
|
||||||
|
Loading…
Reference in New Issue
Block a user