de260eec62
Captures everything needed to rebuild the stack from scratch: infra/compose.yaml - mosquitto (eclipse-mosquitto:latest) - zigbee2mqtt (ghcr.io/pine64/zigbee2mqtt:latest-dev, BLZ fork) - nodered (nodered/node-red:latest) infra/mosquitto/config/mosquitto.conf - anonymous listener on 1883, file logging, persistence on infra/zigbee2mqtt/ - configuration.yaml: 5 paired devices with friendly names, 1 group - coordinator_backup.json: zigbee network key + pan id (recovery) - state.json: per-device persisted state (ON/OFF, linkquality) infra/nodered/ - settings.js: nodered defaults (flowFile: flows.json, no auth) - start.sh: patches Dashboard 2.0 SPA with <base href> at startup Also: - Updated z2m groups section to rename Laser & Fog -> DJ Booth (matches the friendly_name already in devices section) - Pushed the same change to live /root/zigbee2mqtt/configuration.yaml and restarted the zigbee2mqtt container - .gitignore: output/ (regenerated on every build, churns uuid ids) - README.md: link to infra/README.md for rebuild procedure
15 lines
653 B
Bash
15 lines
653 B
Bash
#!/bin/sh
|
|
echo "[start.sh] BEGIN"
|
|
INDEX=/data/node_modules/@flowfuse/node-red-dashboard/dist/index.html
|
|
BASE_HREF="${DASHBOARD_BASE_HREF:-/dashboard/}"
|
|
echo "[start.sh] INDEX=$INDEX BASE_HREF=$BASE_HREF"
|
|
echo "[start.sh] has_base_before=$(grep -c '<base href' $INDEX 2>&1 || echo none)"
|
|
if [ -f "$INDEX" ] && ! grep -q '<base href' "$INDEX"; then
|
|
sed -i "s|<meta name=\"description\"|<base href=\"$BASE_HREF\">
|
|
<meta name=\"description\"|" "$INDEX"
|
|
echo "[start.sh] PATCHED"
|
|
fi
|
|
echo "[start.sh] has_base_after=$(grep -c '<base href' $INDEX 2>&1 || echo none)"
|
|
cd /usr/src/node-red
|
|
exec node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS
|