mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-05-23 16:36:00 +00:00
feat: add deployment configuration for homeassistant service in Docker stack
This commit is contained in:
@@ -207,5 +207,12 @@ deploy-esphome: pull
|
|||||||
set +a ;\
|
set +a ;\
|
||||||
docker stack deploy --compose-file ./swarm/esphome.yml esphome ;\
|
docker stack deploy --compose-file ./swarm/esphome.yml esphome ;\
|
||||||
}
|
}
|
||||||
|
deploy-homeassistant: pull
|
||||||
|
{ \
|
||||||
|
echo "Deploying the homeassistant stack..." ;\
|
||||||
|
set -a ;\
|
||||||
|
. ./swarm/.env ;\
|
||||||
|
set +a ;\
|
||||||
|
docker stack deploy --compose-file ./swarm/homeassistant.yml homeassistant ;\
|
||||||
|
}
|
||||||
# git submodule update --init --recursive
|
# git submodule update --init --recursive
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
x-environment: &app-environment
|
||||||
|
DOMAIN: "${DOMAIN:-furyhawk.lol}"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik-public:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
container_name: homeassistant
|
||||||
|
image: "ghcr.io/home-assistant/home-assistant:stable"
|
||||||
|
volumes:
|
||||||
|
- /var/data/config/homeassistant:/config
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
- /run/dbus:/run/dbus:ro
|
||||||
|
restart: unless-stopped
|
||||||
|
privileged: true
|
||||||
|
expose:
|
||||||
|
- 8123
|
||||||
|
network:
|
||||||
|
- traefik-public
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Singapore
|
||||||
|
- DOMAIN=${DOMAIN}
|
||||||
|
deploy:
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.swarm.network=traefik-public
|
||||||
|
- traefik.constraint-label=traefik-public
|
||||||
|
- traefik.http.routers.homeassistant.entrypoints=https
|
||||||
|
- traefik.http.routers.homeassistant.rule=Host(`ha.${DOMAIN}`)
|
||||||
|
- traefik.http.routers.homeassistant.tls.certresolver=le
|
||||||
|
- traefik.http.routers.homeassistant.service=homeassistant_srv
|
||||||
|
- traefik.http.services.homeassistant_srv.loadbalancer.server.port=8123
|
||||||
Reference in New Issue
Block a user