ha + grafana

master
Paul Walko 2024-02-06 08:19:11 -05:00
parent 96f7bf03e8
commit 0e93da01b3
5 changed files with 146 additions and 0 deletions

31
wind/docker/esphome.sh Executable file
View File

@ -0,0 +1,31 @@
#!/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
}
$@

28
wind/docker/grafana.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 3000 on pew-net
docker run \
--detach \
--name grafana \
--restart unless-stopped \
--user 1000 \
--volume /bigdata/ha/grafana:/var/lib/grafana:rw \
--network pew-net \
grafana/grafana-oss:latest
}
down () {
docker stop grafana || true
docker rm grafana || true
}
logs () {
docker logs --follow grafana
}
$@

30
wind/docker/ha.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 8123 on pew-net
docker run \
--detach \
--name ha \
--restart unless-stopped \
--env TZ=America/New_York \
--volume /bigdata/ha/config:/config:rw \
--volume /run/dbus:/run/dbus:ro \
--device /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220080742-if00 \
--network pew-net \
ghcr.io/home-assistant/home-assistant:stable
}
down () {
docker stop ha || true
docker rm ha || true
}
logs () {
docker logs --follow ha
}
$@

29
wind/docker/prometheus.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 9090 on pew-net
docker run \
--detach \
--name prometheus \
--restart unless-stopped \
--user 1000 \
--volume /bigdata/ha/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro \
--volume /bigdata/ha/prometheus/data:/prometheus:rw \
--network pew-net \
prom/prometheus:latest --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /prometheus --storage.tsdb.retention.time=1y
}
down () {
docker stop prometheus || true
docker rm prometheus || true
}
logs () {
docker logs --follow prometheus
}
$@

28
wind/docker/zwavejs.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 8091 on pew-net
docker run \
--detach \
--name zwavejs \
--restart unless-stopped \
--volume /bigdata/ha/zwavejs/store:/usr/src/app/store:rw \
--device /dev/serial/by-id/usb-Zooz_800_Z-Wave_Stick_533D004242-if00 \
--network pew-net \
zwavejs/zwave-js-ui:latest
}
down () {
docker stop zwavejs || true
docker rm zwavejs || true
}
logs () {
docker logs --follow zwavejs
}
$@