home-automation/docker/run-home-assistant.sh

28 lines
786 B
Bash
Raw Normal View History

2019-05-03 03:21:24 +00:00
#!/bin/bash
2019-05-03 16:54:38 +00:00
# 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
2019-05-03 03:21:24 +00:00
docker container stop home-assistant
docker container rm home-assistant
docker run -it --name home-assistant \
--restart unless-stopped \
--network docker-private \
-e DEBUG=1 \
-l traefik.frontend.rule=Host:home-automation.domain.tld \
-l traefik.frontend.passHostHeader=true \
-l traefik.port=8123 \
2019-05-03 16:54:38 +00:00
-v /etc/localtime:/etc/localtime:ro \
2019-05-03 03:21:24 +00:00
-v /var/home-assistant:/config \
2019-05-03 16:54:38 +00:00
${REPO}:latest