cleanup locations, ya know noob friendly

This commit is contained in:
uprightbass360
2025-11-03 20:54:20 -05:00
parent 37c96731f7
commit 4cdba16d39
13 changed files with 35 additions and 65 deletions

View File

@@ -1,30 +0,0 @@
# Hooks Testing Todo List
This file tracks the testing progress for the new manifest-driven post-install hooks system.
## Testing Tasks
### ✅ Completed
- [x] **Create git branch for hooks refactoring work** - Branch `feature/hooks-testing` created and pushed
### ⏳ Pending
- [ ] **Run fresh deployment with test Lua modules** - Deploy with MODULE_ELUNA_SCRIPTS=1 and MODULE_EVENT_SCRIPTS=1
- [ ] **Verify hook execution and Lua script copying** - Check that hooks run successfully during module installation
- [ ] **Test modules container logs for errors** - Monitor `docker compose logs ac-modules -f` for hook execution
- [ ] **Validate copy-standard-lua hook functionality** - Ensure Lua scripts are copied to `/azerothcore/lua_scripts`
- [ ] **Test all hook types** - Validate all 4 hook scripts work correctly:
- copy-standard-lua (for Eluna modules)
- copy-aio-lua (for AIO modules)
- mod-ale-patches (for mod-ale compatibility)
- black-market-setup (for Black Market module)
- [ ] **Enable additional Lua modules for comprehensive testing** - Test with more modules once basic functionality is confirmed
## Current Test Setup
- **Enabled modules**: MODULE_ELUNA=1, MODULE_ELUNA_SCRIPTS=1, MODULE_EVENT_SCRIPTS=1
- **Branch**: feature/hooks-testing
- **Files modified**: 9 files with new hook system implementation
## Expected Results
- Hooks should execute without "unknown hook" warnings
- Lua scripts should be copied to `/azerothcore/lua_scripts/` directory
- Module installation should complete successfully with proper hook execution logs

View File

@@ -304,14 +304,14 @@ The remote deployment process transfers:
- ❌ Build artifacts (source code, compilation files stay local)
### Module Presets
- Drop comma-separated module lists into `configurations/*.conf` (for example `configurations/playerbot-modules.conf`).
- Drop comma-separated module lists into `profiles/*.conf` (for example `profiles/playerbot-modules.conf`).
- `setup.sh` automatically adds these presets to the module menu and enables the listed modules when selected or when `--module-config <name>` is provided.
- Built-in presets:
- `configurations/suggested-modules.conf` default solo-friendly QoL stack.
- `configurations/playerbots-suggested-modules.conf` suggested stack plus playerbots.
- `configurations/playerbot-only.conf` playerbot-focused profile (adjust `--playerbot-max-bots`).
- `profiles/suggested-modules.conf` default solo-friendly QoL stack.
- `profiles/playerbots-suggested-modules.conf` suggested stack plus playerbots.
- `profiles/playerbot-only.conf` playerbot-focused profile (adjust `--playerbot-max-bots`).
- Custom example:
- `configurations/sam.conf` Sam's playerbot-focused profile (set `--playerbot-max-bots 3000` when using this preset).
- `profiles/sam.conf` Sam's playerbot-focused profile (set `--playerbot-max-bots 3000` when using this preset).
---
@@ -526,8 +526,8 @@ docker exec -it ac-mysql mysql -u root -p
./scripts/restore.sh YYYYMMDD_HHMMSS # Restore from specific backup
# User data backup/import utilities
./backup-export.sh [output_dir] # Export user accounts & characters
./backup-import.sh [backup_dir] # Import user data from backup
./scripts/backup-export.sh [output_dir] # Export user accounts & characters
./scripts/backup-import.sh [backup_dir] # Import user data from backup
# View available backups
ls -la storage/backups/
@@ -536,10 +536,10 @@ ls -la storage/backups/
### Container Management
```bash
# Start specific services
./start-containers.sh # Start all configured containers
./scripts/start-containers.sh # Start all configured containers
# Stop services gracefully
./stop-containers.sh # Stop all containers
./scripts/stop-containers.sh # Stop all containers
# Monitor service health
./status.sh # Check realm status
@@ -550,10 +550,10 @@ ls -la storage/backups/
### Deployment Verification
```bash
# Quick health check
./verify-deployment.sh --skip-deploy --quick
./scripts/verify-deployment.sh --skip-deploy --quick
# Full deployment verification
./verify-deployment.sh
./scripts/verify-deployment.sh
```
---
@@ -636,10 +636,10 @@ Comprehensive cleanup with multiple destruction levels and safety checks.
### Container Lifecycle Management
#### `start-containers.sh` - Service Startup
#### `scripts/start-containers.sh` - Service Startup
Starts all configured containers using appropriate profiles.
#### `stop-containers.sh` - Graceful Shutdown
#### `scripts/stop-containers.sh` - Graceful Shutdown
Stops all containers with proper cleanup and data protection.
#### `status.sh` - Service Health Monitoring
@@ -651,12 +651,12 @@ Stops all containers with proper cleanup and data protection.
### Database & Backup Management
#### `backup-export.sh` - User Data Export
#### `scripts/backup-export.sh` - User Data Export
Exports user accounts and character data for migration or backup purposes.
```bash
./backup-export.sh # Export to ExportBackup_<timestamp>/
./backup-export.sh /path/to/backup/dir # Export to specific directory
./scripts/backup-export.sh # Export to ExportBackup_<timestamp>/
./scripts/backup-export.sh /path/to/backup/dir # Export to specific directory
```
**Output Structure:**
@@ -667,12 +667,12 @@ ExportBackup_YYYYMMDD_HHMMSS/
└── manifest.json # Backup metadata
```
#### `backup-import.sh` - User Data Import
#### `scripts/backup-import.sh` - User Data Import
Restores user accounts and characters from backup while preserving world data.
```bash
./backup-import.sh # Import from ImportBackup/
./backup-import.sh /path/to/backup # Import from specific directory
./scripts/backup-import.sh # Import from ImportBackup/
./scripts/backup-import.sh /path/to/backup # Import from specific directory
```
**Required Files:**
@@ -781,13 +781,13 @@ Deploys web-based management tools (phpMyAdmin, Keira3) independently.
./scripts/deploy-tools.sh # Deploy management tools only
```
#### `verify-deployment.sh` - Deployment Validation
#### `scripts/verify-deployment.sh` - Deployment Validation
Comprehensive deployment verification with health checks and service validation.
```bash
./verify-deployment.sh # Full deployment verification
./verify-deployment.sh --skip-deploy # Verify existing deployment
./verify-deployment.sh --quick # Quick health check only
./scripts/verify-deployment.sh # Full deployment verification
./scripts/verify-deployment.sh --skip-deploy # Verify existing deployment
./scripts/verify-deployment.sh --quick # Quick health check only
```
### Backup System Scripts
@@ -849,20 +849,20 @@ docker logs ac-mysql -f
docker compose restart ac-worldserver
# Stop all services
./stop-containers.sh
./scripts/stop-containers.sh
# Start services
./start-containers.sh
./scripts/start-containers.sh
```
### Database Management
```bash
# Backup user data
./backup-export.sh
./scripts/backup-export.sh
# Restore user data
./backup-import.sh /path/to/backup
./scripts/backup-import.sh /path/to/backup
# Access database directly
docker exec -it ac-mysql mysql -u root -p
@@ -1043,12 +1043,12 @@ storage/backups/
└── acore_world.sql.gz
# User data import/export
ExportBackup_YYYYMMDD_HHMMSS/ # Created by backup-export.sh
ExportBackup_YYYYMMDD_HHMMSS/ # Created by scripts/backup-export.sh
├── acore_auth.sql.gz # User accounts
├── acore_characters.sql.gz # Character data
└── manifest.json
ImportBackup/ # Used by backup-import.sh
ImportBackup/ # Used by scripts/backup-import.sh
├── acore_auth.sql[.gz] # Required: accounts
├── acore_characters.sql[.gz] # Required: characters
└── acore_world.sql[.gz] # Optional: world data
@@ -1154,8 +1154,8 @@ rm -rf local-storage/source local-storage/images
- `BACKUP_RETENTION_HOURS=6`
- Test backup/restore:
```bash
./backup-export.sh
./backup-import.sh /path/to/backup
./scripts/backup-export.sh
./scripts/backup-import.sh /path/to/backup
```
3. **Customize Modules**

View File

@@ -612,7 +612,7 @@ Options:
--backup-retention-hours N Hourly backup retention (default 6)
--backup-daily-time HH Daily backup hour 00-23 (default 09)
--module-mode MODE suggested, playerbots, manual, or none
--module-config NAME Use preset NAME from configurations/<NAME>.conf
--module-config NAME Use preset NAME from profiles/<NAME>.conf
--enable-modules LIST Comma-separated module list (MODULE_* or shorthand)
--playerbot-enabled 0|1 Override PLAYERBOT_ENABLED flag
--playerbot-max-bots N Override PLAYERBOT_MAX_BOTS value
@@ -966,7 +966,7 @@ fi
local MODE_PRESET_NAME=""
declare -A MODULE_PRESET_CONFIGS=()
declare -a MODULE_PRESET_ORDER=()
local CONFIG_DIR="$SCRIPT_DIR/configurations"
local CONFIG_DIR="$SCRIPT_DIR/profiles"
if [ -d "$CONFIG_DIR" ]; then
while IFS= read -r preset_path; do
[ -n "$preset_path" ] || continue
@@ -982,7 +982,7 @@ fi
local missing_presets=0
for required_preset in "$DEFAULT_PRESET_SUGGESTED" "$DEFAULT_PRESET_PLAYERBOTS"; do
if [ -z "${MODULE_PRESET_CONFIGS[$required_preset]:-}" ]; then
say ERROR "Missing module preset configurations/${required_preset}.conf"
say ERROR "Missing module preset profiles/${required_preset}.conf"
missing_presets=1
fi
done
@@ -1051,7 +1051,7 @@ fi
fi
local pretty_name
pretty_name=$(echo "$preset_name" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++){$i=toupper(substr($i,1,1)) substr($i,2)}}1')
echo "${menu_index}) 🧩 ${pretty_name} (configurations/${preset_name}.conf)"
echo "${menu_index}) 🧩 ${pretty_name} (profiles/${preset_name}.conf)"
MENU_PRESET_INDEX[$menu_index]="$preset_name"
menu_index=$((menu_index + 1))
done