From 95e8da796057dd4a65bbb42c101ac4f5493de747 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 5 Jan 2023 13:35:42 +0100 Subject: [PATCH] First version of homeassistant --- firewall | 3 +++ home_assistant/docker-compose.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 home_assistant/docker-compose.yml diff --git a/firewall b/firewall index 822c10e..22888b8 100755 --- a/firewall +++ b/firewall @@ -72,6 +72,9 @@ iptables -A OUTPUT -p tcp --dport 2277 -j ACCEPT # ACCEPT SSH OUTPUT LIKE GITLAB iptables -A INPUT -p icmp -j ACCEPT iptables -A OUTPUT -p icmp -j ACCEPT +# CHROMECAST +iptables -A OUTPUT -p tcp --dport 5555 -j ACCEPT + # Parer les attaques de type Déni de Service iptables -A FORWARD -p tcp --syn -m limit --limit 1/second -j ACCEPT iptables -A FORWARD -p udp -m limit --limit 1/second -j ACCEPT diff --git a/home_assistant/docker-compose.yml b/home_assistant/docker-compose.yml new file mode 100644 index 0000000..9e7397f --- /dev/null +++ b/home_assistant/docker-compose.yml @@ -0,0 +1,30 @@ +version: '3' + +services: + home_assistant: + image: homeassistant/home-assistant + restart: always + container_name: home_assistant + environment: + - TZ=Europe/Paris + volumes: + - home_assistant_config:/config + - /etc/localtime:/etc/localtime:ro + ports: + - 8123:8123 + network_mode: host + cap_add: + - NET_ADMIN + - NET_BIND_SERVICE + - SYS_ADMIN + labels: + - "traefik.enable=true" + - "traefik.http.routers.homeassistant-secure.entrypoints=https" + - "traefik.http.routers.homeassistant-secure.rule=Host(`domo.mrdev023.fr`)" + - "traefik.http.routers.homeassistant-secure.tls=true" + - "traefik.http.routers.homeassistant-secure.tls.certresolver=sslResolver" + # - "traefik.http.routers.homeassistant-secure.service=homeassistant" + - "traefik.http.services.homeassistant.loadbalancer.server.port=8123" + +volumes: + home_assistant_config: