stats B11: EP-Online energy labels (monthly total file → homes per label for NL, Gouda, Gouda PC4s; aggregates only), stats.ep_label_agg, monthly timer with key from ~/.config/stats/ep-online.env, charts on /stats/energy and /stats/gouda
Some checks failed
Deploy production / deploy (push) Has been cancelled

This commit is contained in:
2026-10-25 21:28:37 +00:00
parent 2a4466cb82
commit fa58e5c661
15 changed files with 33573 additions and 6 deletions

View File

@@ -31,4 +31,16 @@ DB_URL=$(sudo -n docker inspect personal-website-app-1 --format '{{range .Config
| sed -n 's/^DB_URL=//p' | sed 's/@db:5432/@127.0.0.1:5440/')
[ -n "$DB_URL" ] || { echo "no DB_URL from app container" >&2; exit 1; }
export DB_URL
# Per-source API keys live in ~/.config/stats/<name>.env (mode 600); exported, never echoed.
case "$source_name" in
eponline) env_file="$HOME/.config/stats/ep-online.env" ;;
*) env_file="" ;;
esac
if [ -n "$env_file" ]; then
[ -r "$env_file" ] || { echo "missing $env_file" >&2; exit 1; }
set -a
# shellcheck disable=SC1090
. "$env_file"
set +a
fi
exec nice -n 10 bun scripts/stats-fetch.ts "$@"