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

28 lines
786 B
Bash
Executable File

#!/bin/bash
# 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
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 \
-v /etc/localtime:/etc/localtime:ro \
-v /var/home-assistant:/config \
${REPO}:latest