28 lines
748 B
Bash
28 lines
748 B
Bash
#!/bin/sh
|
|
|
|
CONFIG_PATH=/data/options.json
|
|
|
|
# Extract options
|
|
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)
|
|
|
|
# Standard MeshMonitor variables
|
|
export PORT=3001
|
|
export NODE_ENV=production
|
|
|
|
# --- MANDATORY FOR INGRESS ---
|
|
# This tells the React app to use relative paths for JS/CSS
|
|
export BASE_URL="./"
|
|
|
|
# Allow Home Assistant to proxy the connection
|
|
export TRUST_PROXY=true
|
|
export ALLOWED_ORIGINS="*"
|
|
|
|
# Optional: Disable secure cookies if you aren't using HTTPS internally
|
|
export COOKIE_SECURE=false
|
|
# -----------------------------
|
|
|
|
echo "Starting MeshMonitor with Ingress support..."
|
|
|
|
cd /app
|
|
exec node dist/server/server.js |