Working initial launch config

This commit is contained in:
KemoNine 2019-05-03 16:54:38 +00:00
parent 91f1a8d1d0
commit 2dccda89dd
3 changed files with 41 additions and 9 deletions

1
.HA_VERSION Normal file
View File

@ -0,0 +1 @@
0.92.2

28
.gitignore vendored
View File

@ -1,3 +1,29 @@
*.conf
*.crt
*.csr
*.db
*.db-journal
*.db-shm
*.db-wal
*.json
*.key
*.log
*.pid
*.sqlite
*.sqlite-journal
*.sqlite-shm
*.sqlite-wal
*.xml
.*
__pycache__/
deps/
ip_bans.yaml
known_devices.yaml
secrets.yaml
ToDo.md
src
!.github
!.gitignore
!.gitkeep
!/.HA_VERSION

View File

@ -1,11 +1,16 @@
#!/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 exec -it postgres psql -U postgres
# create role homeautomation nosuperuser nocreatedb nocreaterole password 'badPassword';
# create database homeautomation owner homeautomation;
ARCH=`arch`
if [ $ARCH == "aarch64" ]
then
REPO="homeassistant/raspberrypi3-64-homeassistant"
else
REPO="homeassistant/raspberrypi3-homeassistant"
fi
docker container stop home-assistant
docker container rm home-assistant
@ -13,10 +18,10 @@ 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 /etc/localtime:/etc/localtime:ro \
-v /var/home-assistant:/config \
home-assistant:latest
${REPO}:latest