From 2dccda89dded3325f921ebd4728dba5260afb120 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Fri, 3 May 2019 16:54:38 +0000 Subject: [PATCH] Working initial launch config --- .HA_VERSION | 1 + .gitignore | 28 +++++++++++++++++++++++++++- docker/run-home-assistant.sh | 21 +++++++++++++-------- 3 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 .HA_VERSION diff --git a/.HA_VERSION b/.HA_VERSION new file mode 100644 index 0000000..5f8dbbf --- /dev/null +++ b/.HA_VERSION @@ -0,0 +1 @@ +0.92.2 \ No newline at end of file diff --git a/.gitignore b/.gitignore index f80e3bb..02db6e3 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/docker/run-home-assistant.sh b/docker/run-home-assistant.sh index 0792e24..97e1a82 100755 --- a/docker/run-home-assistant.sh +++ b/docker/run-home-assistant.sh @@ -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