diff --git a/meshmonitor/Dockerfile b/meshmonitor/Dockerfile new file mode 100644 index 0000000..0a14ec7 --- /dev/null +++ b/meshmonitor/Dockerfile @@ -0,0 +1,12 @@ +ARG BUILD_FROM +FROM ghcr.io/yeraze/meshmonitor:latest + +# Home Assistant requirements +USER root +RUN apk add --no-cache jq + +# Copy local files +COPY run.sh / +RUN chmod a+x /run.sh + +ENTRYPOINT [ "/run.sh" ] diff --git a/meshmonitor/config.yaml b/meshmonitor/config.yaml new file mode 100644 index 0000000..89680fe --- /dev/null +++ b/meshmonitor/config.yaml @@ -0,0 +1,27 @@ +name: "MeshMonitor" +description: "Web tool for monitoring a Meshtastic Node Deployment over TCP/HTTP" +version: "3.9.5" +slug: "meshmonitor" +init: false +arch: + - aarch64 + - amd64 + - armv7 + - armhf +startup: services +boot: auto +ingress: true +ingress_port: 3001 +panel_icon: "mdi:mesh-network" +panel_title: "MeshMonitor" +map: + - "config:rw" + - "share:rw" +options: + meshtastic_node_ip: "192.168.1.xxx" + meshtastic_tcp_port: 4403 + enable_virtual_node: false +schema: + meshtastic_node_ip: "str" + meshtastic_tcp_port: "int" + enable_virtual_node: "bool" diff --git a/meshmonitor/run.sh b/meshmonitor/run.sh new file mode 100644 index 0000000..a661843 --- /dev/null +++ b/meshmonitor/run.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +CONFIG_PATH=/data/options.json + +# Extract options from Home Assistant config +export MESHTASTIC_NODE_IP=$(jq --raw-output '.meshtastic_node_ip' $CONFIG_PATH) +export MESHTASTIC_TCP_PORT=$(jq --raw-output '.meshtastic_tcp_port // 4403' $CONFIG_PATH) +export ENABLE_VIRTUAL_NODE=$(jq --raw-output '.enable_virtual_node // false' $CONFIG_PATH) + +# Standard MeshMonitor variables +export PORT=3001 +export NODE_ENV=production + +echo "Starting MeshMonitor connecting to $MESHTASTIC_NODE_IP:$MESHTASTIC_TCP_PORT..." + +# The application is located in /app in the official image +cd /app +exec node dist/server/server.js diff --git a/overmesh/config.yaml b/overmesh/config.yaml deleted file mode 100644 index 92c7e86..0000000 --- a/overmesh/config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: "OverMesh" -slug: "overmesh" -description: "Web management UI for Meshtastic" -version: "1.0.0" -arch: - - aarch64 - - amd64 -image: "slofi/overmesh:{arch}" -ingress: true -panel_icon: "mdi:lan-connect" -devices: []