#!/usr/bin/env bash set -euo pipefail # Load IP configuration SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true # Diagnose and fix the docker compose error in NPMplus installation echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "🔍 Diagnosing NPMplus Installation Error" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "" echo "The error 'no configuration file provided: not found' occurs when:" echo " 1. docker compose is run from wrong directory" echo " 2. compose.yaml file wasn't created/downloaded" echo " 3. Installation script failed partway through" echo "" echo "📋 Solution:" echo "" echo "If you're running the Proxmox helper script and it fails:" echo "" echo "1. Check which container was created (if any):" echo " ssh root@${PROXMOX_HOST_R630_01:-192.168.11.11} 'pct list | tail -5'" echo "" echo "2. If a container exists, fix it:" echo " bash scripts/nginx-proxy-manager/fix-npmplus-install.sh ${PROXMOX_HOST_R630_01:-192.168.11.11} " echo "" echo "3. If no container exists, the installation failed early." echo " Try running the helper script again:" echo " ssh root@${PROXMOX_HOST_R630_01:-192.168.11.11}" echo " bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/npmplus.sh)\"" echo "" echo "4. If it keeps failing, use the direct installation:" echo " bash scripts/nginx-proxy-manager/install-npmplus-direct.sh" echo "" # Check for any stopped containers that might be NPMplus echo "🔍 Checking for potential NPMplus containers..." STOPPED_CTS=$(ssh root@${PROXMOX_HOST_R630_01:-192.168.11.11} "pct list | grep stopped | tail -3" || echo "") if [ -n "$STOPPED_CTS" ]; then echo "Found stopped containers:" echo "$STOPPED_CTS" echo "" echo "To check if any are NPMplus:" echo " ssh root@${PROXMOX_HOST_R630_01:-192.168.11.11} 'pct config | grep hostname'" fi echo "" echo "💡 Recommended: Use the complete migration script which handles errors:" echo " bash scripts/nginx-proxy-manager/complete-migration.sh" echo ""