32 lines
562 B
Bash
Executable File
32 lines
562 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 always \
|
|
--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
|
|
}
|
|
|
|
$@
|