This commit is contained in:
2026-02-25 21:01:06 +03:00
parent b0d2746490
commit b532527f32
12 changed files with 719 additions and 42 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Fix proxy_host rows where domain_names is stored as string instead of JSON array (causes "e.map is not a function" in NPM UI).
# Run on CT 100 where NPM data lives: ssh root@PROXMOX "pct exec 100 -- bash -s" < scripts/npm-fix-proxy-domain-names.sh
set -e
DB="${NPM_DB:-/opt/docker/nginx-proxy/data/database.sqlite}"
if [ ! -f "$DB" ]; then
echo "Database not found: $DB"
exit 1
fi
# Fix id=10: domain_names was "[mini-lm.katykhin.ru]" (string), must be ["mini-lm.katykhin.ru"] (JSON array)
sqlite3 "$DB" "UPDATE proxy_host SET domain_names = '[\"mini-lm.katykhin.ru\"]' WHERE id = 10;"
echo "Updated proxy_host id=10 domain_names to array."
sqlite3 "$DB" "SELECT id, domain_names FROM proxy_host WHERE id = 10;"