scripts/wind/docker/esphome.sh

32 lines
570 B
Bash
Executable File

#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 6052 on pew-net
docker run \
--detach \
--name esphome \
--restart unless-stopped \
--env ESPHOME_DASHBOARD_USE_PING=true \
--env USERNAME=paul \
--env PASSWORD=paulwalko \
--volume /bigdata/ha/esphome/config:/config:rw \
--volume /etc/localtime:/etc/localtime:ro \
--network pew-net \
ghcr.io/esphome/esphome:stable
}
down () {
docker stop esphome || true
docker rm esphome || true
}
logs () {
docker logs --follow esphome
}
$@