Fix Docker apply crash and add safe profile test flow

Remove invalid _mirror_manager from daemon.json that prevented Docker from starting. Add 2-minute test apply with auto-rollback, final apply confirmation, emergency-restore CLI/UI, and post-restart Docker health checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-10 20:20:10 +03:30
parent 1c9d647787
commit 63d0699cdd
20 changed files with 635 additions and 324 deletions
+25 -18
View File
@@ -1,18 +1,25 @@
#!/bin/bash
set -euo pipefail
INSTALL_DIR="${1:-/opt/mirror-manager}"
BIN="/usr/local/bin/mirror-manager"
echo "نصب Mirror Manager CLI..."
sudo mkdir -p /var/lib/mirror-manager/data
sudo cp "$INSTALL_DIR/mirror-manager" "$BIN"
sudo chmod +x "$BIN"
PROFILE_D="/etc/profile.d/mirror-manager.sh"
echo "export PYTHONPATH=$INSTALL_DIR" | sudo tee "$PROFILE_D" > /dev/null
echo "export MIRROR_CONTAINER_NAME=mirror-manager" | sudo tee -a "$PROFILE_D" > /dev/null
echo "CLI نصب شد: mirror-manager"
echo " mirror-manager status"
echo " mirror-manager restore --initial"
#!/bin/bash
set -euo pipefail
INSTALL_DIR="${1:-/opt/mirror-manager}"
BIN="/usr/local/bin/mirror-manager"
echo "نصب Mirror Manager CLI..."
sudo mkdir -p /var/lib/mirror-manager/data
sudo cp "$INSTALL_DIR/mirror-manager" "$BIN"
sudo chmod +x "$BIN"
PROFILE_D="/etc/profile.d/mirror-manager.sh"
{