some fix
This commit is contained in:
16
scripts/npm-fix-proxy-domain-names.sh
Normal file
16
scripts/npm-fix-proxy-domain-names.sh
Normal 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;"
|
||||
Reference in New Issue
Block a user