Adopt HHF Technology stack structure for Pangolin backup and updates

This commit is contained in:
jschantli committed 2026-09-04 20:42:34 -07:00
1 parent 877ff62105
commit 7875ef0bc2
2 files changed
+66 -21

No files matched your search

+26 -3
View File
@@ -157,16 +157,39 @@ async def trigger_pangolin_update() -> Dict[str, Any]:
# Remote update script executed on the VPS
remote_script = f"""
eval P_DIR="{p_dir}"
P_DIR="${{P_DIR/#~/$HOME}}"
# Locate compose directory
if [ -f "$P_DIR/docker-compose.yml" ] || [ -f "$P_DIR/compose.yaml" ]; then
COMPOSE_DIR="$P_DIR"
elif [ -f "$(dirname "$P_DIR")/docker-compose.yml" ] || [ -f "$(dirname "$P_DIR")/compose.yaml" ]; then
COMPOSE_DIR="$(dirname "$P_DIR")"
else
COMPOSE_DIR="$P_DIR"
fi
echo "=== STEP 1: Connecting to Pangolin VPS ({vps_host}) ==="
cd "{p_dir}" || exit 1
echo "Operating Directory: $COMPOSE_DIR"
cd "$COMPOSE_DIR" || exit 1
# Detect docker compose version
if docker compose version >/dev/null 2>&1; then
DC="docker compose"
elif command -v docker-compose >/dev/null 2>&1; then
DC="docker-compose"
else
echo "ERROR: Neither 'docker compose' nor 'docker-compose' found on VPS."
exit 1
fi
echo ""
echo "=== STEP 2: Pulling latest images on VPS ==="
docker compose pull
$DC pull
echo ""
echo "=== STEP 3: Applying stack updates & recreating containers ==="
docker compose up -d --remove-orphans
$DC up -d --remove-orphans
echo ""
echo "=== STEP 4: Verifying running container status ==="