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
+9 -2
View File
@@ -99,14 +99,21 @@ echo 'export PYTHONPATH=/opt/mirror-manager' | sudo tee /etc/profile.d/mirror-ma
1. به **https://mirror.itistan.ir** بروید
2. با `ADMIN_USERNAME` / `ADMIN_PASSWORD` وارد شوید
3. در **اولین ورود** backup اولیه خودکار گرفته می‌شود
4. یک **پروفایل** انتخاب و **اعمال** کنید
5. در پنجره rollback تست کنید → **تأیید** یا **rollback**
4. یک **پروفایل** انتخاب کنید → **تست موقت (۲ دقیقه)** بزنید
5. Dokploy و deploy را تست کنید → **اعمال نهایی** (نگه‌داشتن تغییرات)
6. اگر مشکل پیش آمد: `mirror-manager emergency-restore` از SSH
---
## CLI (از SSH)
```bash
# بازگردانی فوری — آخرین backup قبل از apply (توصیه در emergency)
mirror-manager emergency-restore
# یا معادل:
mirror-manager restore --last
# بازگردانی تنظیمات اولیه (قبل از نصب Mirror Manager)
mirror-manager restore --initial