23 lines
681 B
Bash
Executable File
23 lines
681 B
Bash
Executable File
#!/bin/bash
|
|
|
|
cd /var/home-assistant/src
|
|
#git clone https://github.com/home-assistant/home-assistant.git .
|
|
git pull
|
|
LATEST=`git tag | sort -r | grep -v Last-Python2-release | head -n1`
|
|
git checkout $LATEST
|
|
docker build -t home-assistant:lastest -t home-assistant:${LATEST} .
|
|
|
|
docker container stop home-assistant
|
|
docker container rm home-assistant
|
|
|
|
docker run -it --name home-assistant \
|
|
--restart unless-stopped \
|
|
--network docker-private \
|
|
-e TZ=UTC \
|
|
-e DEBUG=1 \
|
|
-l traefik.frontend.rule=Host:home-automation.domain.tld \
|
|
-l traefik.frontend.passHostHeader=true \
|
|
-l traefik.port=8123 \
|
|
-v /var/home-assistant:/config \
|
|
home-assistant:latest
|