# Scripts Directory This directory contains deployment, configuration, and management scripts for the AzerothCore Docker deployment. ## Core Scripts ### ๐Ÿš€ Setup & Deployment - **`setup-server.sh`** - Interactive server setup wizard (recommended for new users) - **`deploy-and-check.sh`** - Automated deployment and comprehensive health check script - **`auto-post-install.sh`** - Automated post-installation configuration ### ๐Ÿ”ง Configuration & Management - **`configure-modules.sh`** - Module configuration analysis and guidance tool - **`setup-eluna.sh`** - Lua scripting environment setup - **`update-realmlist.sh`** - Update server address in realmlist configuration - **`update-config.sh`** - Configuration file updates and management ### ๐Ÿ’พ Backup & Restore - **`backup.sh`** - Manual database backup - **`backup-hourly.sh`** - Hourly automated backup script - **`backup-daily.sh`** - Daily automated backup script - **`restore.sh`** - Database restoration from backup ### ๐Ÿงน Maintenance - **`cleanup.sh`** - Resource cleanup script with multiple cleanup levels - **`rebuild-with-modules.sh`** - Rebuild containers with module compilation - **`test-local-worldserver.sh`** - Local worldserver testing ### ๐Ÿ“š Documentation - **`DEPLOYMENT.md`** - Complete documentation for deployment scripts - **`CLEANUP.md`** - Complete documentation for cleanup scripts ## Quick Usage ### ๐Ÿ†• First-Time Setup (Recommended) ```bash # Interactive setup wizard ./scripts/setup-server.sh ``` ### ๐Ÿ”ง Module Configuration Analysis ```bash # Check module configuration requirements ./scripts/configure-modules.sh ``` ### ๐ŸŽฎ Lua Scripting Setup ```bash # Setup Eluna scripting environment ./scripts/setup-eluna.sh ``` ### ๐Ÿฉบ Health Checks & Deployment **Run Health Check on Current Deployment** ```bash cd scripts ./deploy-and-check.sh --skip-deploy ``` **Full Deployment with Health Checks** ```bash cd scripts ./deploy-and-check.sh ``` **Quick Health Check (Basic Tests Only)** ```bash cd scripts ./deploy-and-check.sh --skip-deploy --quick-check ``` ### ๐Ÿงน Cleanup Resources ```bash cd scripts # Stop containers only (safe) ./cleanup.sh --soft # Remove containers + networks (preserves data) ./cleanup.sh --hard # Complete removal (DESTROYS ALL DATA) ./cleanup.sh --nuclear # Dry run to see what would happen ./cleanup.sh --hard --dry-run ``` ### ๐Ÿ’พ Backup & Restore Operations ```bash # Manual backup ./scripts/backup.sh # Restore from backup ./scripts/restore.sh backup_filename.sql # Setup automated backups (already configured in containers) # Hourly: ./scripts/backup-hourly.sh # Daily: ./scripts/backup-daily.sh ``` ## Features ### ๐Ÿš€ Setup & Deployment Features โœ… **Interactive Setup Wizard**: Guided configuration for new users โœ… **Automated Server Deployment**: Complete three-layer deployment system โœ… **Module Management**: Automated installation and configuration of 13 enhanced modules โœ… **Post-Install Automation**: Automatic database setup, realmlist configuration, and service restart ### ๐Ÿ”ง Configuration Features โœ… **Module Analysis**: Identifies missing configurations and requirements โœ… **Lua Scripting Setup**: Automated Eluna environment with example scripts โœ… **Realmlist Management**: Dynamic server address configuration โœ… **Config File Management**: Automated .conf file generation from .conf.dist templates ### ๐Ÿฉบ Health & Monitoring Features โœ… **Container Health Validation**: Checks all core containers โœ… **Port Connectivity Tests**: Validates all external ports โœ… **Web Service Verification**: HTTP response and content validation โœ… **Database Validation**: Schema and realm configuration checks โœ… **Comprehensive Reporting**: Color-coded status with detailed results ### ๐Ÿ’พ Backup & Maintenance Features โœ… **Automated Backups**: Scheduled hourly and daily database backups โœ… **Manual Backup/Restore**: On-demand backup and restoration tools โœ… **Multi-Level Cleanup**: Safe, hard, and nuclear cleanup options โœ… **Container Rebuilding**: Module compilation and container rebuilding support ## Script Usage Examples ### First-Time Server Setup ```bash # Complete guided setup (recommended) ./scripts/setup-server.sh # Follow the interactive prompts to configure: # - Server network settings # - Storage locations # - Database passwords # - Module selections ``` ### Post-Installation Configuration ```bash # Analyze and configure modules ./scripts/configure-modules.sh # Setup Lua scripting environment ./scripts/setup-eluna.sh # Update server address after IP changes ./scripts/update-realmlist.sh new.server.address ``` ### Maintenance Operations ```bash # Health check existing deployment ./scripts/deploy-and-check.sh --skip-deploy # Clean restart (preserves data) ./scripts/cleanup.sh --hard ./scripts/deploy-and-check.sh # Backup before major changes ./scripts/backup.sh ``` ## Configuration Variables The scripts work with the updated environment variable names: - `MYSQL_EXTERNAL_PORT` (database port) - `AUTH_EXTERNAL_PORT` (authentication server port) - `WORLD_EXTERNAL_PORT` (world server port) - `SOAP_EXTERNAL_PORT` (SOAP API port) - `MYSQL_ROOT_PASSWORD` (database root password) - `SERVER_ADDRESS` (external server address) - `STORAGE_ROOT` (data storage location) For complete documentation, see `DEPLOYMENT.md` and `CLEANUP.md`.