Files
Unheard0840 d8d53c6ca1 Update app.sh
Use Fulcrum endpoint from environment
2026-08-08 13:55:40 +00:00

44 lines
687 B
Bash

#!/bin/sh
set -eu
echo "Munin-bitcoin starting..."
if [ -n "${MUNIN_FULCRUM_URL:-}" ]; then
echo "Fulcrum endpoint configured: ${MUNIN_FULCRUM_URL}"
else
echo "Warning: MUNIN_FULCRUM_URL is not configured"
fi
echo "Starting status API..."
node /app/server/status.js &
cat > /tmp/nginx.conf <<EOF
events {}
http {
server {
listen 80;
root /app/web;
location /api/ {
proxy_pass http://127.0.0.1:8080;
}
location / {
index index.html;
}
}
}
EOF
echo "Starting web interface..."
nginx -g "daemon off;" -c /tmp/nginx.conf &
while true
do
echo "Munin-bitcoin is running"
sleep 300
done