Refactor Windows deployment scripts: unify build and management tools
Major improvements to Windows deployment workflow: ✨ New Unified Scripts: - Build-ROA2WEB.ps1: Single build script for all components (Frontend, Backend, TelegramBot) * Supports selective builds: -Component All|Frontend|Backend|TelegramBot * Replaces Build-Frontend.ps1 and Build-TelegramBot.ps1 * Consistent output structure and better validation - Manage-ROA2WEB.ps1: Unified service management * Single entry point for Start, Stop, Restart, Status actions * Supports -Component All|Backend|TelegramBot * Health checks and detailed status reporting * Replaces 6 separate Start/Stop/Restart scripts 🗑️ Removed Deprecated Scripts: - Start-ROA2WEB.ps1, Stop-ROA2WEB.ps1, Restart-ROA2WEB.ps1 - Start-TelegramBot.ps1, Stop-TelegramBot.ps1, Restart-TelegramBot.ps1 (6 scripts → 1 unified Manage-ROA2WEB.ps1) ⚠️ Marked as DEPRECATED (backward compatibility): - Build-Frontend.ps1 (use Build-ROA2WEB.ps1 -Component Frontend) - Build-TelegramBot.ps1 (use Build-ROA2WEB.ps1 -Component TelegramBot) 🧹 Cleanup & Organization: - Updated .gitignore: deploy-package/ and build artifacts excluded - Removed deploy-package/ from git tracking (generated artifacts) - Added DEPLOY_PACKAGE.md with generation instructions - Created comprehensive scripts/README.md documentation 📝 Documentation Updates: - Updated CLAUDE.md Windows deployment section - Added complete script reference guide - Migration guide from old scripts to new unified system 📊 Impact: - 18 scripts → 11 scripts (39% reduction) - ~10,000 LOC → ~6,500 LOC (35% reduction) - Zero duplicate code - Cleaner git repository (no build artifacts) - Unified, consistent API across all operations Migration: ./Build-Frontend.ps1 → ./Build-ROA2WEB.ps1 -Component Frontend ./Build-TelegramBot.ps1 → ./Build-ROA2WEB.ps1 -Component TelegramBot ./Start-ROA2WEB.ps1 → ./Manage-ROA2WEB.ps1 -Action Start -Component Backend ./Restart-TelegramBot.ps1 → ./Manage-ROA2WEB.ps1 -Action Restart -Component TelegramBot 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
38
CLAUDE.md
38
CLAUDE.md
@@ -367,9 +367,15 @@ See `DEPLOYMENT_GUIDE.md` for full Linux/Docker deployment instructions.
|
||||
Windows Server deployment uses IIS and Windows Services without Docker:
|
||||
|
||||
**Build deployment package (on WSL/Linux development machine):**
|
||||
```bash
|
||||
```powershell
|
||||
cd deployment/windows/scripts
|
||||
./Build-Frontend.ps1
|
||||
|
||||
# Build complete package (Frontend + Backend + Telegram Bot)
|
||||
.\Build-ROA2WEB.ps1
|
||||
|
||||
# Or build specific components
|
||||
.\Build-ROA2WEB.ps1 -Component Frontend # Frontend + Backend only
|
||||
.\Build-ROA2WEB.ps1 -Component TelegramBot # Telegram Bot only
|
||||
|
||||
# Output: ./deploy-package/
|
||||
# Transfer this to Windows Server
|
||||
@@ -379,22 +385,30 @@ cd deployment/windows/scripts
|
||||
```powershell
|
||||
# Initial installation
|
||||
cd C:\path\to\deploy-package\scripts
|
||||
|
||||
# Install main application
|
||||
.\Install-ROA2WEB.ps1
|
||||
|
||||
# Configure application
|
||||
# Install Telegram Bot
|
||||
.\Install-TelegramBot.ps1
|
||||
|
||||
# Configure applications
|
||||
notepad C:\inetpub\wwwroot\roa2web\backend\.env
|
||||
notepad C:\inetpub\wwwroot\roa2web\telegram-bot\.env
|
||||
|
||||
# Deploy application files
|
||||
.\Deploy-ROA2WEB.ps1 -SourcePath "C:\path\to\deploy-package"
|
||||
# Deploy/update application files
|
||||
.\Deploy-ROA2WEB.ps1
|
||||
.\Deploy-TelegramBot.ps1
|
||||
|
||||
# Management
|
||||
.\Start-ROA2WEB.ps1
|
||||
.\Stop-ROA2WEB.ps1
|
||||
.\Restart-ROA2WEB.ps1
|
||||
# Service Management (Unified)
|
||||
.\Manage-ROA2WEB.ps1 -Action Start # Start all services
|
||||
.\Manage-ROA2WEB.ps1 -Action Stop # Stop all services
|
||||
.\Manage-ROA2WEB.ps1 -Action Restart # Restart all services
|
||||
.\Manage-ROA2WEB.ps1 -Action Status # Check status
|
||||
|
||||
# Check status
|
||||
Get-Service ROA2WEB-Backend
|
||||
Get-Website ROA2WEB
|
||||
# Manage specific components
|
||||
.\Manage-ROA2WEB.ps1 -Action Start -Component Backend
|
||||
.\Manage-ROA2WEB.ps1 -Action Restart -Component TelegramBot
|
||||
```
|
||||
|
||||
**Windows Deployment Architecture:**
|
||||
|
||||
Reference in New Issue
Block a user