mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 09:07:20 +00:00
Compare commits
15 Commits
807618b82d
...
c0aaf8ce96
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0aaf8ce96 | ||
|
|
861e924aae | ||
|
|
4e8af3f7a7 | ||
|
|
dc32e715ca | ||
|
|
93d3df7436 | ||
|
|
179c486f73 | ||
|
|
a497f2844c | ||
|
|
b046f7f8ba | ||
|
|
f5b3b07bcb | ||
|
|
07110902a6 | ||
|
|
a67bfcd87b | ||
|
|
b0444019ae | ||
|
|
29d299e402 | ||
|
|
10c45716cf | ||
|
|
3a8f076894 |
@@ -14,7 +14,7 @@ COMPOSE_OVERRIDE_WORLDSERVER_DEBUG_LOGGING_ENABLED=0
|
||||
# Project name
|
||||
# =====================
|
||||
# Customize this to match your deployment slug (used for container names/tags)
|
||||
COMPOSE_PROJECT_NAME=azerothcore-stack
|
||||
COMPOSE_PROJECT_NAME=azerothcore-realmmaster
|
||||
|
||||
# =====================
|
||||
# Storage & Timezone
|
||||
@@ -76,10 +76,17 @@ DB_GUARD_VERIFY_INTERVAL_SECONDS=86400
|
||||
# =====================
|
||||
STAGE_PATH_MODULE_SQL=${STORAGE_MODULE_SQL_PATH}
|
||||
|
||||
# =====================
|
||||
# Modules rebuild source path
|
||||
# =====================
|
||||
# Default AzerothCore source checkout used for module rebuilds
|
||||
MODULES_REBUILD_SOURCE_PATH=${STORAGE_PATH_LOCAL}/source/azerothcore
|
||||
|
||||
# =====================
|
||||
# SQL Source Overlay
|
||||
# =====================
|
||||
AC_SQL_SOURCE_PATH=${STORAGE_LOCAL_SOURCE_PATH}/azerothcore-playerbots/data/sql
|
||||
SOURCE_DIR=${MODULES_REBUILD_SOURCE_PATH}
|
||||
AC_SQL_SOURCE_PATH=${MODULES_REBUILD_SOURCE_PATH}/data/sql
|
||||
|
||||
# =====================
|
||||
# Images
|
||||
@@ -89,15 +96,15 @@ AC_DB_IMPORT_IMAGE=acore/ac-wotlk-db-import:master
|
||||
AC_AUTHSERVER_IMAGE=acore/ac-wotlk-authserver:master
|
||||
AC_WORLDSERVER_IMAGE=acore/ac-wotlk-worldserver:master
|
||||
# Services (Playerbots)
|
||||
AC_AUTHSERVER_IMAGE_PLAYERBOTS=azerothcore-realmmaster:authserver-playerbots
|
||||
AC_WORLDSERVER_IMAGE_PLAYERBOTS=azerothcore-realmmaster:worldserver-playerbots
|
||||
AC_AUTHSERVER_IMAGE_PLAYERBOTS=${COMPOSE_PROJECT_NAME}:authserver-playerbots
|
||||
AC_WORLDSERVER_IMAGE_PLAYERBOTS=${COMPOSE_PROJECT_NAME}:worldserver-playerbots
|
||||
# Services (Module Build Tags)
|
||||
# Images used during module compilation and tagging
|
||||
AC_AUTHSERVER_IMAGE_MODULES=azerothcore-realmmaster:authserver-modules-latest
|
||||
AC_WORLDSERVER_IMAGE_MODULES=azerothcore-realmmaster:worldserver-modules-latest
|
||||
AC_AUTHSERVER_IMAGE_MODULES=${COMPOSE_PROJECT_NAME}:authserver-modules-latest
|
||||
AC_WORLDSERVER_IMAGE_MODULES=${COMPOSE_PROJECT_NAME}:worldserver-modules-latest
|
||||
# Client Data
|
||||
AC_CLIENT_DATA_IMAGE=acore/ac-wotlk-client-data:master
|
||||
AC_CLIENT_DATA_IMAGE_PLAYERBOTS=uprightbass360/azerothcore-wotlk-playerbots:client-data-Playerbot
|
||||
AC_CLIENT_DATA_IMAGE_PLAYERBOTS=${COMPOSE_PROJECT_NAME}:client-data-playerbots
|
||||
# Build artifacts
|
||||
DOCKER_IMAGE_TAG=master
|
||||
AC_AUTHSERVER_IMAGE_BASE=acore/ac-wotlk-authserver
|
||||
@@ -230,81 +237,10 @@ CLIENT_DATA_PATH=
|
||||
SERVER_CONFIG_PRESET=none
|
||||
CLIENT_DATA_CACHE_PATH=${STORAGE_PATH_LOCAL}/client-data-cache
|
||||
|
||||
# =====================
|
||||
# Module toggles (0/1)
|
||||
# =====================
|
||||
# Enable/disable modules by setting to 1 (enabled) or 0 (disabled)
|
||||
# Modules are organized by category for easier navigation
|
||||
|
||||
# 🤖 Automation
|
||||
# Playerbot and AI systems
|
||||
# mod-playerbots: Installs SQL/config assets; core functionality is built into playerbot images
|
||||
|
||||
# ✨ Quality of Life
|
||||
# Convenience features that improve gameplay experience
|
||||
|
||||
# ⚔️ Gameplay Enhancement
|
||||
# Core gameplay improvements and mechanics
|
||||
|
||||
# 🏪 NPC Services
|
||||
# Service NPCs that provide player utilities
|
||||
# mod-npc-talent-template: Admin commands: .templatenpc create [TemplateName] and .templatenpc reload
|
||||
|
||||
# ⚡ PvP
|
||||
# Player vs Player focused modules
|
||||
# mod-arena-replay: NPC ID: 98500; known issue: players who were participants experience unusual behavior when watching their own replay
|
||||
|
||||
# 📈 Progression
|
||||
# Character and server progression systems
|
||||
# mod-progression-system: SQL files cannot be unloaded once executed; requires auto DB updater enabled in worldserver config
|
||||
# mod-zone-difficulty: Mythicmode NPC 1128001 spawned in raids/heroic dungeons; NPC 1128002 for Mythicmode rewards
|
||||
|
||||
# 💰 Economy
|
||||
# Auction house, trading, and economic systems
|
||||
|
||||
# 👥 Social
|
||||
# Social and community features
|
||||
|
||||
# 👤 Account-Wide
|
||||
# Features that apply across all characters on an account
|
||||
|
||||
# 🎨 Customization
|
||||
# Character and appearance customization
|
||||
# mod-morphsummon: Allows customization of summoned creature appearances (Warlock demons, Death Knight ghouls, Mage water elementals); NPC ID: 601072
|
||||
|
||||
# 📜 Scripting
|
||||
# Lua/Eluna scripting frameworks and tools
|
||||
# mod-aio: Azeroth Interface Override - enables client-server interface communication
|
||||
|
||||
# 🔧 Admin Tools
|
||||
# Server administration and management utilities
|
||||
# mod-keep-out: Requires editing database table mod_mko_map_lock; use .gps command to obtain map and zone IDs
|
||||
# mod-spell-regulator: WARNING: Custom code changes mandatory before module functions; requires custom hooks from external gist
|
||||
|
||||
# 💎 Premium/VIP
|
||||
# Premium account and VIP systems
|
||||
# mod-premium: Script must be assigned to an item (like hearthstone) using script name 'premium_account'
|
||||
|
||||
# 🎮 Mini-Games
|
||||
# Fun and entertainment features
|
||||
# mod-tic-tac-toe: NPC ID: 100155
|
||||
|
||||
# 🏰 Content
|
||||
# Additional game content and features
|
||||
|
||||
# 🎁 Rewards
|
||||
# Player reward and incentive systems
|
||||
# mod-resurrection-scroll: Requires EnablePlayerSettings to be enabled in worldserver config file
|
||||
|
||||
# 🛠️ Developer Tools
|
||||
# Development and testing utilities
|
||||
|
||||
# =====================
|
||||
# Rebuild automation
|
||||
# =====================
|
||||
AUTO_REBUILD_ON_DEPLOY=0
|
||||
# Default AzerothCore source checkout used for module rebuilds
|
||||
MODULES_REBUILD_SOURCE_PATH=${STORAGE_PATH_LOCAL}/source/azerothcore
|
||||
|
||||
# =====================
|
||||
# Source repositories
|
||||
@@ -620,3 +556,5 @@ MODULE_MOD_MATERIAL_BANK=0
|
||||
MODULE_MOD_PROGRESSION_BLIZZLIKE=0
|
||||
MODULE_MOD_PYTHON_ENGINE=0
|
||||
MODULE_WRATH_OF_THE_VANILLA_V2=0
|
||||
MODULE_DUELS=0
|
||||
MODULE_WOW_CORE=0
|
||||
|
||||
44
.gitignore
vendored
44
.gitignore
vendored
@@ -1,23 +1,27 @@
|
||||
database-import/*.sql
|
||||
database-import/*.sql.gz
|
||||
database-import/*/
|
||||
database-import/ImportBackup*/
|
||||
source/*
|
||||
local-data-tools/
|
||||
changelogs/
|
||||
# ===================================
|
||||
# Environment & Configuration
|
||||
# ===================================
|
||||
.env
|
||||
.claude/
|
||||
.mcp*/
|
||||
|
||||
# ===================================
|
||||
# Storage & Data Directories
|
||||
# ===================================
|
||||
storage/
|
||||
local-storage/
|
||||
.claude/
|
||||
images/
|
||||
node_modules/
|
||||
.mcp*/
|
||||
scripts/__pycache__/*
|
||||
scripts/python/__pycache__/*
|
||||
.env
|
||||
package-lock.json
|
||||
package.json
|
||||
todo.md
|
||||
db_*/
|
||||
|
||||
# ===================================
|
||||
# Build Artifacts & Cache
|
||||
# ===================================
|
||||
.gocache/
|
||||
.module-ledger/
|
||||
deploy.log
|
||||
statusdash
|
||||
statusdash
|
||||
scripts/__pycache__/*
|
||||
scripts/bash/__pycache__/*
|
||||
scripts/python/__pycache__/*
|
||||
|
||||
# ===================================
|
||||
# Logs & Runtime State
|
||||
# ===================================
|
||||
deploy.log
|
||||
87
CHANGELOG.md
87
CHANGELOG.md
@@ -1,87 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## [2025-11-09] - Recent Changes
|
||||
|
||||
### ✨ Features
|
||||
|
||||
#### Backup System Enhancements
|
||||
- **Manual Backup Support**: Added `manual-backup.sh` script (92 lines) enabling on-demand database backups through the ac-backup container
|
||||
- **Backup Permission Fixes**: Resolved Docker volume permission issues with backup operations
|
||||
- **Container User Configuration**: Backup operations now run as proper container user to avoid permission conflicts
|
||||
|
||||
#### Remote Deployment
|
||||
- **Auto Deploy Option**: Added remote auto-deployment functionality to `deploy.sh` (36 additional lines) for automated server provisioning
|
||||
|
||||
#### Configuration Management System
|
||||
- **Database/Config Import**: Major new feature with 1,405+ lines of code across 15 files
|
||||
- Added `apply-config.py` (323 lines) for dynamic server configuration
|
||||
- Created `configure-server.sh` (162 lines) for server setup automation
|
||||
- Implemented `import-database-files.sh` (68 lines) for database initialization
|
||||
- Added `parse-config-presets.py` (92 lines) for configuration templating
|
||||
- **Configuration Presets**: 5 new server preset configurations
|
||||
- `blizzlike.conf` - Authentic Blizzard-like experience
|
||||
- `casual-pve.conf` - Relaxed PvE gameplay
|
||||
- `fast-leveling.conf` - Accelerated character progression
|
||||
- `hardcore-pvp.conf` - Competitive PvP settings
|
||||
- `none.conf` - Minimal configuration baseline
|
||||
- **Dynamic Server Overrides**: `server-overrides.conf` (134 lines) for customizable server parameters
|
||||
- **Comprehensive Config Documentation**: `CONFIG_MANAGEMENT.md` (279 lines) detailing the entire configuration system
|
||||
|
||||
#### Infrastructure Improvements
|
||||
- **MySQL Exposure Toggle**: Optional MySQL port exposure for external database access
|
||||
- **Client Data Management**: Automatic client data detection, download, and binding with version detection
|
||||
- **Dynamic Docker Overrides**: Flexible compose override system for modular container configurations
|
||||
- **Module Profile System**: Structured module management with preset profiles
|
||||
|
||||
### 🏗️ Refactoring
|
||||
|
||||
#### Script Organization
|
||||
- **Directory Restructure**: Reorganized all scripts into `scripts/bash/` and `scripts/python/` directories (40 files moved/modified)
|
||||
- **Project Naming**: Added centralized project name management with `project_name.sh`
|
||||
- **Module Manifest Rename**: Moved `modules.json` → `module-manifest.json` for clarity
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
#### Container Improvements
|
||||
- **Client Data Container**: Enhanced with 7zip support, root access during extraction, and ownership fixes
|
||||
- **Permission Resolution**: Fixed file ownership issues in client data extraction process
|
||||
- **Path Updates**: Corrected deployment paths and script references after reorganization
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
#### Major Documentation Overhaul
|
||||
- **Modular Documentation**: Split massive README into focused documents (1,500+ lines reorganized)
|
||||
- `docs/GETTING_STARTED.md` (467 lines) - Setup and initial configuration
|
||||
- `docs/MODULES.md` (264 lines) - Module management and customization
|
||||
- `docs/SCRIPTS.md` (404 lines) - Script reference and automation
|
||||
- `docs/ADVANCED.md` (207 lines) - Advanced configuration topics
|
||||
- `docs/TROUBLESHOOTING.md` (127 lines) - Common issues and solutions
|
||||
- **README Streamlining**: Reduced main README from 1,200+ to focused overview
|
||||
- **Script Documentation**: Updated script references and usage examples throughout
|
||||
|
||||
### 🔧 Technical Changes
|
||||
|
||||
#### Development Experience
|
||||
- **Setup Enhancements**: Improved `setup.sh` with better error handling and configuration options (66 lines added)
|
||||
- **Status Monitoring**: Enhanced `status.sh` with better container and service monitoring
|
||||
- **Build Process**: Updated build scripts with new directory structure and module handling
|
||||
- **Cleanup Operations**: Improved cleanup scripts with proper path handling
|
||||
|
||||
#### DevOps & Deployment
|
||||
- **Remote Cleanup**: Enhanced remote server cleanup and temporary file management
|
||||
- **Network Binding**: Improved container networking and port management
|
||||
- **Import Folder**: Added dedicated import directory structure
|
||||
- **Development Onboarding**: Streamlined developer setup process
|
||||
|
||||
---
|
||||
|
||||
### Migration Notes
|
||||
- Scripts have moved from `scripts/` to `scripts/bash/` and `scripts/python/`
|
||||
- Module configuration is now in `config/module-manifest.json`
|
||||
- New environment variables added for MySQL exposure and client data management
|
||||
- Configuration presets are available in `config/presets/`
|
||||
|
||||
### Breaking Changes
|
||||
- Script paths have changed due to reorganization
|
||||
- Module manifest file has been renamed
|
||||
- Some environment variables have been added/modified
|
||||
14
build.sh
14
build.sh
@@ -38,6 +38,7 @@ Build AzerothCore with custom modules and create deployment-ready images.
|
||||
Options:
|
||||
--yes, -y Auto-confirm all prompts
|
||||
--force Force rebuild even if no changes detected
|
||||
--force-update Force update source repository to latest commits
|
||||
--source-path PATH Custom source repository path
|
||||
--skip-source-setup Skip automatic source repository setup
|
||||
-h, --help Show this help
|
||||
@@ -53,6 +54,7 @@ Examples:
|
||||
./build.sh Interactive build
|
||||
./build.sh --yes Auto-confirm build
|
||||
./build.sh --force Force rebuild regardless of state
|
||||
./build.sh --force-update Update source to latest and build
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -60,6 +62,7 @@ while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--yes|-y) ASSUME_YES=1; shift;;
|
||||
--force) FORCE_REBUILD=1; shift;;
|
||||
--force-update) FORCE_UPDATE=1; shift;;
|
||||
--source-path) CUSTOM_SOURCE_PATH="$2"; shift 2;;
|
||||
--skip-source-setup) SKIP_SOURCE_SETUP=1; shift;;
|
||||
-h|--help) usage; exit 0;;
|
||||
@@ -240,6 +243,13 @@ ensure_source_repo(){
|
||||
src_path="${src_path//\/.\//\/}"
|
||||
|
||||
if [ -d "$src_path/.git" ]; then
|
||||
if [ "${FORCE_UPDATE:-0}" = "1" ]; then
|
||||
info "Force update requested - updating source repository to latest" >&2
|
||||
if ! (cd "$ROOT_DIR" && ./scripts/bash/setup-source.sh) >&2; then
|
||||
err "Failed to update source repository" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "$src_path"
|
||||
return
|
||||
fi
|
||||
@@ -540,6 +550,10 @@ stage_modules(){
|
||||
rm -f "$staging_modules_dir/.modules_state" "$staging_modules_dir/.requires_rebuild" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Export environment variables needed by module hooks
|
||||
export STACK_SOURCE_VARIANT="$(read_env STACK_SOURCE_VARIANT "core")"
|
||||
export MODULES_REBUILD_SOURCE_PATH="$(read_env MODULES_REBUILD_SOURCE_PATH "")"
|
||||
|
||||
if ! (cd "$local_modules_dir" && bash "$ROOT_DIR/scripts/bash/manage-modules.sh"); then
|
||||
err "Module staging failed; aborting build"
|
||||
return 1
|
||||
|
||||
49
changelog.sh
49
changelog.sh
@@ -99,7 +99,36 @@ done
|
||||
# Get last build time from container metadata
|
||||
get_last_build_time() {
|
||||
local containers=("ac-worldserver" "ac-authserver")
|
||||
local images=("azerothcore-stack:worldserver-playerbots" "azerothcore-stack:authserver-playerbots")
|
||||
local images=()
|
||||
|
||||
# Require COMPOSE_PROJECT_NAME to be set
|
||||
if [[ -z "${COMPOSE_PROJECT_NAME:-}" ]]; then
|
||||
warn "COMPOSE_PROJECT_NAME not set in environment"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Use actual image names from environment
|
||||
# Detect variant to check appropriate images
|
||||
if [[ "${STACK_IMAGE_MODE:-standard}" == "playerbots" ]] || [[ "${MODULE_PLAYERBOTS:-0}" == "1" ]] || [[ "${PLAYERBOT_ENABLED:-0}" == "1" ]] || [[ "${STACK_SOURCE_VARIANT:-}" == "playerbots" ]]; then
|
||||
if [[ -z "${AC_WORLDSERVER_IMAGE_PLAYERBOTS:-}" ]] || [[ -z "${AC_AUTHSERVER_IMAGE_PLAYERBOTS:-}" ]]; then
|
||||
warn "Playerbots mode detected but AC_WORLDSERVER_IMAGE_PLAYERBOTS or AC_AUTHSERVER_IMAGE_PLAYERBOTS not set"
|
||||
return 1
|
||||
fi
|
||||
images=(
|
||||
"${AC_WORLDSERVER_IMAGE_PLAYERBOTS}"
|
||||
"${AC_AUTHSERVER_IMAGE_PLAYERBOTS}"
|
||||
)
|
||||
else
|
||||
if [[ -z "${AC_WORLDSERVER_IMAGE:-}" ]] || [[ -z "${AC_AUTHSERVER_IMAGE:-}" ]]; then
|
||||
warn "Standard mode detected but AC_WORLDSERVER_IMAGE or AC_AUTHSERVER_IMAGE not set"
|
||||
return 1
|
||||
fi
|
||||
images=(
|
||||
"${AC_WORLDSERVER_IMAGE}"
|
||||
"${AC_AUTHSERVER_IMAGE}"
|
||||
)
|
||||
fi
|
||||
|
||||
local latest_date=""
|
||||
|
||||
# Try to get build timestamp from containers and images
|
||||
@@ -143,7 +172,7 @@ if [[ -n "$SINCE_DATE" ]]; then
|
||||
DATE_DESC="since $SINCE_DATE"
|
||||
else
|
||||
# Try to use last build time as default
|
||||
LAST_BUILD_DATE=$(get_last_build_time)
|
||||
LAST_BUILD_DATE=$(get_last_build_time 2>/dev/null) || LAST_BUILD_DATE=""
|
||||
|
||||
if [[ -n "$LAST_BUILD_DATE" ]]; then
|
||||
SINCE_OPTION="--since=$LAST_BUILD_DATE"
|
||||
@@ -194,11 +223,17 @@ detect_source_config() {
|
||||
$VERBOSE && log "Switched to playerbots variant" >&2
|
||||
fi
|
||||
|
||||
# Repository URLs from environment or defaults
|
||||
local standard_repo="${ACORE_REPO_STANDARD:-https://github.com/azerothcore/azerothcore-wotlk.git}"
|
||||
local standard_branch="${ACORE_BRANCH_STANDARD:-master}"
|
||||
local playerbots_repo="${ACORE_REPO_PLAYERBOTS:-https://github.com/mod-playerbots/azerothcore-wotlk.git}"
|
||||
local playerbots_branch="${ACORE_BRANCH_PLAYERBOTS:-Playerbot}"
|
||||
# Repository URLs from environment (required)
|
||||
local standard_repo="${ACORE_REPO_STANDARD}"
|
||||
local standard_branch="${ACORE_BRANCH_STANDARD}"
|
||||
local playerbots_repo="${ACORE_REPO_PLAYERBOTS}"
|
||||
local playerbots_branch="${ACORE_BRANCH_PLAYERBOTS}"
|
||||
|
||||
if [[ -z "$standard_repo" ]] || [[ -z "$standard_branch" ]] || [[ -z "$playerbots_repo" ]] || [[ -z "$playerbots_branch" ]]; then
|
||||
warn "Repository configuration missing from environment"
|
||||
warn "Required: ACORE_REPO_STANDARD, ACORE_BRANCH_STANDARD, ACORE_REPO_PLAYERBOTS, ACORE_BRANCH_PLAYERBOTS"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ "$variant" == "playerbots" ]]; then
|
||||
echo "$playerbots_repo|$playerbots_branch|$LOCAL_STORAGE_ROOT/source/azerothcore-playerbots"
|
||||
|
||||
@@ -146,8 +146,6 @@ sanitize_project_name(){
|
||||
project_name::sanitize "$1"
|
||||
}
|
||||
|
||||
PROJECT_IMAGE_PREFIX="$(sanitize_project_name "${COMPOSE_PROJECT_NAME:-$DEFAULT_PROJECT_NAME}")"
|
||||
|
||||
remove_storage_dir(){
|
||||
local path="$1"
|
||||
if [ -d "$path" ]; then
|
||||
@@ -223,8 +221,7 @@ nuclear_cleanup() {
|
||||
|
||||
# Remove project images (server/tool images typical to this project)
|
||||
execute_command "Remove acore images" "docker images --format '{{.Repository}}:{{.Tag}}' | grep -E '^acore/' | xargs -r docker rmi"
|
||||
execute_command "Remove local project images" "docker images --format '{{.Repository}}:{{.Tag}}' | grep -E '^${PROJECT_IMAGE_PREFIX}:' | xargs -r docker rmi"
|
||||
execute_command "Remove legacy playerbots images" "docker images --format '{{.Repository}}:{{.Tag}}' | grep -E '^uprightbass360/azerothcore-wotlk-playerbots' | xargs -r docker rmi"
|
||||
execute_command "Remove project-specific images" "docker images --format '{{.Repository}}:{{.Tag}}' | grep -E \"^${PROJECT_NAME}:\" | xargs -r docker rmi"
|
||||
execute_command "Remove tool images" "docker images --format '{{.Repository}}:{{.Tag}}' | grep -E 'phpmyadmin|uprightbass360/keira3' | xargs -r docker rmi"
|
||||
|
||||
# Storage cleanup (preserve backups if requested)
|
||||
|
||||
@@ -5475,6 +5475,48 @@
|
||||
"requires": [],
|
||||
"post_install_hooks": [],
|
||||
"config_cleanup": []
|
||||
},
|
||||
{
|
||||
"key": "MODULE_AZEROTHCORE_REALMMASTER",
|
||||
"name": "AzerothCore-RealmMaster",
|
||||
"repo": "https://github.com/uprightbass360/AzerothCore-RealmMaster.git",
|
||||
"description": "Automated AzerothCore docker stack with tooling. ",
|
||||
"type": "tool",
|
||||
"category": "tooling",
|
||||
"notes": "Discovered via GitHub topic 'azerothcore-tools'",
|
||||
"status": "blocked",
|
||||
"order": 5000,
|
||||
"requires": [],
|
||||
"post_install_hooks": [],
|
||||
"config_cleanup": []
|
||||
},
|
||||
{
|
||||
"key": "MODULE_DUELS",
|
||||
"name": "Duels",
|
||||
"repo": "https://github.com/VikasMahajan370/Duels.git",
|
||||
"description": "\u2694\ufe0f Experience engaging duels with a feature-rich plugin for Paper 1.21+ servers, featuring 1.8 Legacy combat, matchmaking, custom kits, and more.",
|
||||
"type": "cpp",
|
||||
"category": "uncategorized",
|
||||
"notes": "Discovered via GitHub topic 'azerothcore-module'",
|
||||
"status": "active",
|
||||
"order": 5000,
|
||||
"requires": [],
|
||||
"post_install_hooks": [],
|
||||
"config_cleanup": []
|
||||
},
|
||||
{
|
||||
"key": "MODULE_WOW_CORE",
|
||||
"name": "wow-core",
|
||||
"repo": "https://github.com/Wow-Libre/wow-core.git",
|
||||
"description": "Complete management platform for private World of Warcraft servers.",
|
||||
"type": "tool",
|
||||
"category": "tooling",
|
||||
"notes": "Discovered via GitHub topic 'azerothcore-tools'",
|
||||
"status": "active",
|
||||
"order": 5000,
|
||||
"requires": [],
|
||||
"post_install_hooks": [],
|
||||
"config_cleanup": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
"MODULE_ASSISTANT",
|
||||
"MODULE_REAGENT_BANK",
|
||||
"MODULE_BLACK_MARKET_AUCTION_HOUSE",
|
||||
"MODULE_ELUNA_TS",
|
||||
"MODULE_ELUNA",
|
||||
"MODULE_AIO",
|
||||
"MODULE_ELUNA_SCRIPTS",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"modules": [
|
||||
|
||||
"MODULE_ELUNA"
|
||||
],
|
||||
"label": "\u2b50 AzerothCore Main - Mod Free",
|
||||
"label": "\ud83d\udd30 AzerothCore Main - Mod Free",
|
||||
"description": "Pure AzerothCore with no optional modules enabled",
|
||||
"order": 3
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"modules": [
|
||||
"MODULE_PLAYERBOTS",
|
||||
"MODULE_ELUNA",
|
||||
"MODULE_ELUNA_TS"
|
||||
"MODULE_ELUNA"
|
||||
],
|
||||
"label": "\ud83e\udde9 Playerbots Only",
|
||||
"description": "Minimal preset that only enables playerbot prerequisites",
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
"MODULE_NPC_BUFFER",
|
||||
"MODULE_LEARN_SPELLS",
|
||||
"MODULE_FIREWORKS",
|
||||
"MODULE_ELUNA_TS",
|
||||
"MODULE_ELUNA",
|
||||
"MODULE_AIO"
|
||||
],
|
||||
"label": "\ud83e\udd16 Playerbots + Suggested modules",
|
||||
"label": "\ud83e\udd16 Suggested modules (Playerbots)",
|
||||
"description": "Suggested stack plus playerbots enabled",
|
||||
"order": 1
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"modules": [
|
||||
"MODULE_ELUNA_TS",
|
||||
"MODULE_ELUNA",
|
||||
"MODULE_AIO",
|
||||
"MODULE_SOLO_LFG",
|
||||
@@ -11,7 +10,7 @@
|
||||
"MODULE_LEARN_SPELLS",
|
||||
"MODULE_FIREWORKS"
|
||||
],
|
||||
"label": "\u2b50 Suggested Modules",
|
||||
"label": "\u2b50 Suggested Modules (Main)",
|
||||
"description": "Baseline solo-friendly quality of life mix (no playerbots)",
|
||||
"order": 2
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ storage/
|
||||
├── client-data/ # Unpacked WoW client data & DBC overrides
|
||||
├── logs/ # Server log files
|
||||
├── modules/ # Downloaded module source code
|
||||
├── lua_scripts/ # Eluna Lua scripts (auto-loaded)
|
||||
├── lua_scripts/ # ALE Lua scripts (auto-loaded)
|
||||
├── install-markers/ # Module installation state tracking
|
||||
└── backups/ # Automated database backups
|
||||
├── daily/ # Daily backups (retained per BACKUP_RETENTION_DAYS)
|
||||
@@ -190,6 +190,26 @@ The build system is optimized for development and production deployments with Do
|
||||
- Build artifact caching for faster rebuilds
|
||||
- Support for custom patches and modifications
|
||||
|
||||
### Module Build Source Path
|
||||
|
||||
**`MODULES_REBUILD_SOURCE_PATH`** - Path to AzerothCore source used for C++ module compilation.
|
||||
|
||||
**Default:** `${STORAGE_PATH_LOCAL}/source/azerothcore`
|
||||
|
||||
Auto-selects the appropriate fork:
|
||||
- Playerbots enabled → `./local-storage/source/azerothcore-playerbots`
|
||||
- Standard build → `./local-storage/source/azerothcore`
|
||||
|
||||
**Custom Override:**
|
||||
```bash
|
||||
MODULES_REBUILD_SOURCE_PATH=/path/to/custom/azerothcore
|
||||
```
|
||||
|
||||
**Notes:**
|
||||
- Must be a valid AzerothCore git repository
|
||||
- Cannot be inside `STORAGE_PATH` (performance)
|
||||
- Auto-managed by `setup-source.sh` and `rebuild-with-modules.sh`
|
||||
|
||||
## Custom Configuration
|
||||
Advanced customization options for specialized deployments and development environments.
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ The module collection is organized into the following categories:
|
||||
| **[eluna-scripts](https://github.com/Isidorsson/Eluna-scripts.git)** | Collection of Lua scripts for creating custom gameplay mechanics and features |
|
||||
| **[eluna-ts](https://github.com/azerothcore/eluna-ts.git)** | Adds a TS-to-Lua workflow so Eluna scripts can be authored with modern tooling |
|
||||
| **[mod-aio](https://github.com/Rochet2/AIO.git)** | Pure Lua server-client communication system for bidirectional data transmission |
|
||||
| **[mod-ale](https://github.com/azerothcore/mod-ale.git)** | Adds Eluna Lua scripting engine for creating custom gameplay mechanics |
|
||||
| **[mod-ale](https://github.com/azerothcore/mod-ale.git)** | ALE (AzerothCore Lua Engine) - Lua scripting engine for custom gameplay mechanics (formerly Eluna) |
|
||||
|
||||
## Admin Tools
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ MODULES_ENABLED="mod-playerbots mod-aoe-loot ..."
|
||||
**What Gets Built:**
|
||||
- AzerothCore with playerbots branch
|
||||
- 93 modules compiled and integrated in this run (current manifest: 348 total / 221 supported)
|
||||
- Custom Docker images: `acore-compose:worldserver-modules-latest` etc.
|
||||
- Custom Docker images: `${COMPOSE_PROJECT_NAME}:worldserver-modules-latest` etc.
|
||||
|
||||
### Deployment Status: READY TO DEPLOY 🚀
|
||||
|
||||
|
||||
@@ -415,6 +415,51 @@ Comprehensive deployment verification with health checks and service validation.
|
||||
./scripts/bash/verify-deployment.sh --quick # Quick health check only
|
||||
```
|
||||
|
||||
#### `scripts/bash/validate-env.sh` - Environment Configuration Validator
|
||||
Validates `.env` configuration for required and optional variables with detailed reporting.
|
||||
|
||||
```bash
|
||||
./scripts/bash/validate-env.sh # Basic validation (required vars only)
|
||||
./scripts/bash/validate-env.sh --strict # Validate required + optional vars
|
||||
./scripts/bash/validate-env.sh --quiet # Errors only, suppress success messages
|
||||
```
|
||||
|
||||
**Exit Codes:**
|
||||
- `0` - All required variables present (and optional if --strict)
|
||||
- `1` - Missing required variables
|
||||
- `2` - Missing optional variables (only in --strict mode)
|
||||
|
||||
**Validates:**
|
||||
- **Project Configuration:** `COMPOSE_PROJECT_NAME`, `NETWORK_NAME`
|
||||
- **Repository URLs:** Standard and playerbots AzerothCore repositories
|
||||
- **Storage Paths:** `STORAGE_PATH`, `STORAGE_PATH_LOCAL`, `MODULES_REBUILD_SOURCE_PATH`
|
||||
- **Database Settings:** MySQL credentials, ports, database names
|
||||
- **Container Config:** Container names and user permissions
|
||||
- **Build Paths:** Module rebuild source paths (optional)
|
||||
- **Performance Tuning:** MySQL buffer pool, InnoDB settings (optional)
|
||||
- **Image References:** Docker image tags (optional)
|
||||
|
||||
**Use Cases:**
|
||||
- Pre-deployment validation
|
||||
- Troubleshooting configuration issues
|
||||
- CI/CD pipeline checks
|
||||
- Documentation of environment requirements
|
||||
|
||||
**Example Output:**
|
||||
```
|
||||
ℹ️ Validating environment configuration...
|
||||
✅ Loaded environment from /path/to/.env
|
||||
|
||||
ℹ️ Checking required variables...
|
||||
✅ COMPOSE_PROJECT_NAME=azerothcore-realmmaster
|
||||
✅ NETWORK_NAME=azerothcore
|
||||
✅ STORAGE_PATH=./storage
|
||||
✅ MYSQL_ROOT_PASSWORD=********
|
||||
✅ All required variables are set
|
||||
|
||||
✅ Environment validation passed ✨
|
||||
```
|
||||
|
||||
### Backup System Scripts
|
||||
|
||||
#### `scripts/bash/backup-scheduler.sh` - Automated Backup Service
|
||||
|
||||
@@ -141,6 +141,10 @@ run_post_install_hooks(){
|
||||
export MODULES_ROOT="${MODULES_ROOT:-/modules}"
|
||||
export LUA_SCRIPTS_TARGET="/azerothcore/lua_scripts"
|
||||
|
||||
# Pass build environment variables to hooks
|
||||
export STACK_SOURCE_VARIANT="${STACK_SOURCE_VARIANT:-}"
|
||||
export MODULES_REBUILD_SOURCE_PATH="${MODULES_REBUILD_SOURCE_PATH:-}"
|
||||
|
||||
# Execute the hook script
|
||||
if "$hook_script"; then
|
||||
ok "Hook '$hook' completed successfully"
|
||||
@@ -174,7 +178,18 @@ install_enabled_modules(){
|
||||
continue
|
||||
fi
|
||||
if [ -d "$dir/.git" ]; then
|
||||
info "$dir already present; skipping clone"
|
||||
info "$dir already present; checking for updates"
|
||||
(cd "$dir" && git fetch origin >/dev/null 2>&1 || warn "Failed to fetch updates for $dir")
|
||||
local current_branch
|
||||
current_branch=$(cd "$dir" && git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "master")
|
||||
if (cd "$dir" && git pull origin "$current_branch" 2>&1 | grep -q "Already up to date"); then
|
||||
info "$dir is already up to date"
|
||||
else
|
||||
ok "$dir updated from remote"
|
||||
fi
|
||||
if [ -n "$ref" ]; then
|
||||
(cd "$dir" && git checkout "$ref") || warn "Unable to checkout ref $ref for $dir"
|
||||
fi
|
||||
elif [ -d "$dir" ]; then
|
||||
warn "$dir exists but is not a git repository; leaving in place"
|
||||
else
|
||||
|
||||
@@ -4,6 +4,7 @@ import os
|
||||
import re
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
@@ -468,8 +469,14 @@ def docker_stats():
|
||||
|
||||
def main():
|
||||
env = load_env()
|
||||
project = read_env(env, "COMPOSE_PROJECT_NAME", "acore-compose")
|
||||
network = read_env(env, "NETWORK_NAME", "azerothcore")
|
||||
project = read_env(env, "COMPOSE_PROJECT_NAME")
|
||||
if not project:
|
||||
print(json.dumps({"error": "COMPOSE_PROJECT_NAME not set in environment"}), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
network = read_env(env, "NETWORK_NAME")
|
||||
if not network:
|
||||
print(json.dumps({"error": "NETWORK_NAME not set in environment"}), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
services = [
|
||||
("ac-mysql", "MySQL"),
|
||||
|
||||
301
scripts/bash/validate-env.sh
Executable file
301
scripts/bash/validate-env.sh
Executable file
@@ -0,0 +1,301 @@
|
||||
#!/bin/bash
|
||||
# Validate environment configuration for AzerothCore RealmMaster
|
||||
# Usage: ./scripts/bash/validate-env.sh [--strict] [--quiet]
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
ENV_FILE="$PROJECT_ROOT/.env"
|
||||
TEMPLATE_FILE="$PROJECT_ROOT/.env.template"
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
# Flags
|
||||
STRICT_MODE=false
|
||||
QUIET_MODE=false
|
||||
EXIT_CODE=0
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--strict)
|
||||
STRICT_MODE=true
|
||||
shift
|
||||
;;
|
||||
--quiet)
|
||||
QUIET_MODE=true
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTIONS]
|
||||
|
||||
Validates environment configuration for required variables.
|
||||
|
||||
OPTIONS:
|
||||
--strict Fail on missing optional variables
|
||||
--quiet Only show errors, suppress info/success messages
|
||||
-h, --help Show this help
|
||||
|
||||
EXIT CODES:
|
||||
0 - All required variables present
|
||||
1 - Missing required variables
|
||||
2 - Missing optional variables (only in --strict mode)
|
||||
|
||||
REQUIRED VARIABLES:
|
||||
Project Configuration:
|
||||
COMPOSE_PROJECT_NAME - Project name for containers/images
|
||||
NETWORK_NAME - Docker network name
|
||||
|
||||
Repository Configuration:
|
||||
ACORE_REPO_STANDARD - Standard AzerothCore repository URL
|
||||
ACORE_BRANCH_STANDARD - Standard AzerothCore branch name
|
||||
ACORE_REPO_PLAYERBOTS - Playerbots repository URL
|
||||
ACORE_BRANCH_PLAYERBOTS - Playerbots branch name
|
||||
|
||||
Storage Paths:
|
||||
STORAGE_PATH - Main storage path
|
||||
STORAGE_PATH_LOCAL - Local storage path
|
||||
|
||||
Database Configuration:
|
||||
MYSQL_ROOT_PASSWORD - MySQL root password
|
||||
MYSQL_USER - MySQL user (typically root)
|
||||
MYSQL_PORT - MySQL port (typically 3306)
|
||||
MYSQL_HOST - MySQL hostname
|
||||
DB_AUTH_NAME - Auth database name
|
||||
DB_WORLD_NAME - World database name
|
||||
DB_CHARACTERS_NAME - Characters database name
|
||||
DB_PLAYERBOTS_NAME - Playerbots database name
|
||||
|
||||
Container Configuration:
|
||||
CONTAINER_MYSQL - MySQL container name
|
||||
CONTAINER_USER - Container user (format: uid:gid)
|
||||
|
||||
OPTIONAL VARIABLES (checked with --strict):
|
||||
MySQL Performance:
|
||||
MYSQL_INNODB_BUFFER_POOL_SIZE - InnoDB buffer pool size
|
||||
MYSQL_INNODB_LOG_FILE_SIZE - InnoDB log file size
|
||||
MYSQL_INNODB_REDO_LOG_CAPACITY - InnoDB redo log capacity
|
||||
|
||||
Database Connection:
|
||||
DB_RECONNECT_SECONDS - Database reconnection delay
|
||||
DB_RECONNECT_ATTEMPTS - Database reconnection attempts
|
||||
|
||||
Build Configuration:
|
||||
MODULES_REBUILD_SOURCE_PATH - Path to source for module builds
|
||||
|
||||
Backup Configuration:
|
||||
BACKUP_PATH - Backup storage path
|
||||
BACKUP_RETENTION_DAYS - Daily backup retention
|
||||
BACKUP_RETENTION_HOURS - Hourly backup retention
|
||||
|
||||
Image Configuration:
|
||||
AC_AUTHSERVER_IMAGE - Auth server Docker image
|
||||
AC_WORLDSERVER_IMAGE - World server Docker image
|
||||
AC_DB_IMPORT_IMAGE - Database import Docker image
|
||||
|
||||
EXAMPLES:
|
||||
$0 # Basic validation
|
||||
$0 --strict # Strict validation (check optional vars)
|
||||
$0 --quiet # Only show errors
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo -e "${RED}Unknown option: $1${NC}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
log_info() {
|
||||
$QUIET_MODE || echo -e "${BLUE}ℹ️ $*${NC}"
|
||||
}
|
||||
|
||||
log_success() {
|
||||
$QUIET_MODE || echo -e "${GREEN}✅ $*${NC}"
|
||||
}
|
||||
|
||||
log_warning() {
|
||||
echo -e "${YELLOW}⚠️ $*${NC}" >&2
|
||||
}
|
||||
|
||||
log_error() {
|
||||
echo -e "${RED}❌ $*${NC}" >&2
|
||||
}
|
||||
|
||||
# Load environment
|
||||
load_env() {
|
||||
local file="$1"
|
||||
if [[ ! -f "$file" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "$file" 2>/dev/null || return 1
|
||||
set +a
|
||||
return 0
|
||||
}
|
||||
|
||||
# Check if variable is set and non-empty
|
||||
check_var() {
|
||||
local var_name="$1"
|
||||
local var_value="${!var_name:-}"
|
||||
|
||||
if [[ -z "$var_value" ]]; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Validate required variables
|
||||
validate_required() {
|
||||
local missing=()
|
||||
|
||||
local required_vars=(
|
||||
# Project Configuration
|
||||
"COMPOSE_PROJECT_NAME"
|
||||
"NETWORK_NAME"
|
||||
# Repository Configuration
|
||||
"ACORE_REPO_STANDARD"
|
||||
"ACORE_BRANCH_STANDARD"
|
||||
"ACORE_REPO_PLAYERBOTS"
|
||||
"ACORE_BRANCH_PLAYERBOTS"
|
||||
# Storage Paths
|
||||
"STORAGE_PATH"
|
||||
"STORAGE_PATH_LOCAL"
|
||||
# Database Configuration
|
||||
"MYSQL_ROOT_PASSWORD"
|
||||
"MYSQL_USER"
|
||||
"MYSQL_PORT"
|
||||
"MYSQL_HOST"
|
||||
"DB_AUTH_NAME"
|
||||
"DB_WORLD_NAME"
|
||||
"DB_CHARACTERS_NAME"
|
||||
"DB_PLAYERBOTS_NAME"
|
||||
# Container Configuration
|
||||
"CONTAINER_MYSQL"
|
||||
"CONTAINER_USER"
|
||||
)
|
||||
|
||||
log_info "Checking required variables..."
|
||||
|
||||
for var in "${required_vars[@]}"; do
|
||||
if check_var "$var"; then
|
||||
log_success "$var=${!var}"
|
||||
else
|
||||
log_error "$var is not set"
|
||||
missing+=("$var")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${#missing[@]} -gt 0 ]]; then
|
||||
log_error "Missing required variables: ${missing[*]}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
log_success "All required variables are set"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Validate optional variables (strict mode)
|
||||
validate_optional() {
|
||||
local missing=()
|
||||
|
||||
local optional_vars=(
|
||||
# MySQL Performance Tuning
|
||||
"MYSQL_INNODB_BUFFER_POOL_SIZE"
|
||||
"MYSQL_INNODB_LOG_FILE_SIZE"
|
||||
"MYSQL_INNODB_REDO_LOG_CAPACITY"
|
||||
# Database Connection Settings
|
||||
"DB_RECONNECT_SECONDS"
|
||||
"DB_RECONNECT_ATTEMPTS"
|
||||
# Build Configuration
|
||||
"MODULES_REBUILD_SOURCE_PATH"
|
||||
# Backup Configuration
|
||||
"BACKUP_PATH"
|
||||
"BACKUP_RETENTION_DAYS"
|
||||
"BACKUP_RETENTION_HOURS"
|
||||
# Image Configuration
|
||||
"AC_AUTHSERVER_IMAGE"
|
||||
"AC_WORLDSERVER_IMAGE"
|
||||
"AC_DB_IMPORT_IMAGE"
|
||||
)
|
||||
|
||||
log_info "Checking optional variables..."
|
||||
|
||||
for var in "${optional_vars[@]}"; do
|
||||
if check_var "$var"; then
|
||||
log_success "$var is set"
|
||||
else
|
||||
log_warning "$var is not set (using default)"
|
||||
missing+=("$var")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${#missing[@]} -gt 0 ]]; then
|
||||
log_warning "Optional variables not set: ${missing[*]}"
|
||||
return 2
|
||||
fi
|
||||
|
||||
log_success "All optional variables are set"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Main validation
|
||||
main() {
|
||||
log_info "Validating environment configuration..."
|
||||
echo ""
|
||||
|
||||
# Check if .env exists
|
||||
if [[ ! -f "$ENV_FILE" ]]; then
|
||||
log_error ".env file not found at $ENV_FILE"
|
||||
log_info "Copy .env.template to .env and configure it:"
|
||||
log_info " cp $TEMPLATE_FILE $ENV_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Load environment
|
||||
if ! load_env "$ENV_FILE"; then
|
||||
log_error "Failed to load $ENV_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log_success "Loaded environment from $ENV_FILE"
|
||||
echo ""
|
||||
|
||||
# Validate required variables
|
||||
if ! validate_required; then
|
||||
EXIT_CODE=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
# Validate optional variables if strict mode
|
||||
if $STRICT_MODE; then
|
||||
if ! validate_optional; then
|
||||
[[ $EXIT_CODE -eq 0 ]] && EXIT_CODE=2
|
||||
fi
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Final summary
|
||||
if [[ $EXIT_CODE -eq 0 ]]; then
|
||||
log_success "Environment validation passed ✨"
|
||||
elif [[ $EXIT_CODE -eq 1 ]]; then
|
||||
log_error "Environment validation failed (missing required variables)"
|
||||
elif [[ $EXIT_CODE -eq 2 ]]; then
|
||||
log_warning "Environment validation passed with warnings (missing optional variables)"
|
||||
fi
|
||||
|
||||
exit $EXIT_CODE
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
module acore-compose/statusdash
|
||||
module azerothcore-realmmaster/statusdash
|
||||
|
||||
go 1.22
|
||||
|
||||
|
||||
@@ -41,9 +41,68 @@ Reads patch definitions from module metadata.
|
||||
|
||||
## Module-Specific Hooks
|
||||
|
||||
Module-specific hooks are named after their primary module:
|
||||
- `mod-ale-patches` - Apply mod-ale compatibility fixes
|
||||
- `black-market-setup` - Black Market specific setup
|
||||
Module-specific hooks are named after their primary module and handle unique setup requirements.
|
||||
|
||||
### `mod-ale-patches`
|
||||
Applies compatibility patches for mod-ale (ALE - AzerothCore Lua Engine, formerly Eluna) when building with the AzerothCore playerbots fork.
|
||||
|
||||
**Auto-Detection:**
|
||||
The hook automatically detects if you're building with the playerbots fork by checking:
|
||||
1. `STACK_SOURCE_VARIANT=playerbots` environment variable
|
||||
2. `MODULES_REBUILD_SOURCE_PATH` contains "azerothcore-playerbots"
|
||||
|
||||
**Patches Applied:**
|
||||
|
||||
#### SendTrainerList Compatibility Fix
|
||||
**When Applied:** Automatically for playerbots fork (or when `APPLY_SENDTRAINERLIST_PATCH=1`)
|
||||
**What it fixes:** Adds missing `GetGUID()` call to fix trainer list display
|
||||
**File:** `src/LuaEngine/methods/PlayerMethods.h`
|
||||
**Change:**
|
||||
```cpp
|
||||
// Before (broken)
|
||||
player->GetSession()->SendTrainerList(obj);
|
||||
|
||||
// After (fixed)
|
||||
player->GetSession()->SendTrainerList(obj->GetGUID());
|
||||
```
|
||||
|
||||
#### MovePath Compatibility Fix
|
||||
**When Applied:** Only when explicitly enabled with `APPLY_MOVEPATH_PATCH=1` (disabled by default)
|
||||
**What it fixes:** Updates deprecated waypoint movement API
|
||||
**File:** `src/LuaEngine/methods/CreatureMethods.h`
|
||||
**Change:**
|
||||
```cpp
|
||||
// Before (deprecated)
|
||||
MoveWaypoint(creature->GetWaypointPath(), true);
|
||||
|
||||
// After (updated API)
|
||||
MovePath(creature->GetWaypointPath(), FORCED_MOVEMENT_RUN);
|
||||
```
|
||||
**Note:** Currently disabled by default as testing shows it's not required for normal operation.
|
||||
|
||||
**Feature Flags:**
|
||||
```bash
|
||||
# Automatically set for playerbots fork
|
||||
APPLY_SENDTRAINERLIST_PATCH=1
|
||||
|
||||
# Disabled by default - enable if needed
|
||||
APPLY_MOVEPATH_PATCH=0
|
||||
```
|
||||
|
||||
**Debug Output:**
|
||||
The hook provides detailed debug information during builds:
|
||||
```
|
||||
🔧 mod-ale-patches: Applying playerbots fork compatibility fixes to mod-ale
|
||||
✅ Playerbots detected via MODULES_REBUILD_SOURCE_PATH
|
||||
✅ Applied SendTrainerList compatibility fix
|
||||
✅ Applied 1 compatibility patch(es)
|
||||
```
|
||||
|
||||
**Why This Exists:**
|
||||
The playerbots fork has slightly different API signatures in certain WorldSession methods. These patches ensure mod-ale (Eluna) compiles and functions correctly with both standard AzerothCore and the playerbots fork.
|
||||
|
||||
### `black-market-setup`
|
||||
Black Market specific setup tasks.
|
||||
|
||||
## Usage in Manifest
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Module-specific hook for mod-ale compatibility patches
|
||||
# NOTE: These patches are primarily needed for the AzerothCore playerbots fork
|
||||
set -e
|
||||
|
||||
# Hook environment
|
||||
@@ -7,12 +8,42 @@ MODULE_KEY="${MODULE_KEY:-}"
|
||||
MODULE_DIR="${MODULE_DIR:-}"
|
||||
MODULE_NAME="${MODULE_NAME:-}"
|
||||
|
||||
# Detect if we're building with playerbots fork
|
||||
IS_PLAYERBOTS_FORK=0
|
||||
|
||||
# Method 1: Check STACK_SOURCE_VARIANT environment variable
|
||||
if [ "${STACK_SOURCE_VARIANT:-}" = "playerbots" ]; then
|
||||
IS_PLAYERBOTS_FORK=1
|
||||
echo " ✅ Playerbots detected via STACK_SOURCE_VARIANT"
|
||||
# Method 2: Check MODULES_REBUILD_SOURCE_PATH
|
||||
elif [ -n "${MODULES_REBUILD_SOURCE_PATH:-}" ] && echo "${MODULES_REBUILD_SOURCE_PATH}" | grep -q "azerothcore-playerbots"; then
|
||||
IS_PLAYERBOTS_FORK=1
|
||||
echo " ✅ Playerbots detected via MODULES_REBUILD_SOURCE_PATH"
|
||||
else
|
||||
echo " ❌ Playerbots fork not detected"
|
||||
echo " 🔍 Debug: STACK_SOURCE_VARIANT='${STACK_SOURCE_VARIANT:-}'"
|
||||
echo " 🔍 Debug: MODULES_REBUILD_SOURCE_PATH='${MODULES_REBUILD_SOURCE_PATH:-}'"
|
||||
fi
|
||||
|
||||
# Feature flags (set to 0 to disable specific patches)
|
||||
APPLY_MOVEPATH_PATCH="${APPLY_MOVEPATH_PATCH:-0}" # Disabled by default - appears unnecessary
|
||||
# SendTrainerList patch: auto-detect based on fork, but can be overridden
|
||||
if [ -z "${APPLY_SENDTRAINERLIST_PATCH:-}" ]; then
|
||||
APPLY_SENDTRAINERLIST_PATCH="$IS_PLAYERBOTS_FORK" # Only needed for playerbots fork
|
||||
else
|
||||
APPLY_SENDTRAINERLIST_PATCH="${APPLY_SENDTRAINERLIST_PATCH}"
|
||||
fi
|
||||
|
||||
if [ -z "$MODULE_DIR" ] || [ ! -d "$MODULE_DIR" ]; then
|
||||
echo "❌ mod-ale-patches: Invalid module directory: $MODULE_DIR"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "🔧 mod-ale-patches: Applying compatibility fixes to $MODULE_NAME"
|
||||
if [ "$IS_PLAYERBOTS_FORK" = "1" ]; then
|
||||
echo "🔧 mod-ale-patches: Applying playerbots fork compatibility fixes to $MODULE_NAME"
|
||||
else
|
||||
echo "🔧 mod-ale-patches: Checking compatibility fixes for $MODULE_NAME"
|
||||
fi
|
||||
|
||||
# Apply MovePath compatibility patch
|
||||
apply_movepath_patch() {
|
||||
@@ -37,10 +68,42 @@ apply_movepath_patch() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Apply SendTrainerList compatibility patch
|
||||
apply_sendtrainerlist_patch() {
|
||||
local target_file="$MODULE_DIR/src/LuaEngine/methods/PlayerMethods.h"
|
||||
|
||||
if [ ! -f "$target_file" ]; then
|
||||
echo " ⚠️ SendTrainerList patch target file missing: $target_file"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if the buggy code exists (without GetGUID())
|
||||
if grep -q 'player->GetSession()->SendTrainerList(obj);' "$target_file"; then
|
||||
# Apply the fix by adding ->GetGUID()
|
||||
if sed -i 's/player->GetSession()->SendTrainerList(obj);/player->GetSession()->SendTrainerList(obj->GetGUID());/' "$target_file"; then
|
||||
echo " ✅ Applied SendTrainerList compatibility fix"
|
||||
return 0
|
||||
else
|
||||
echo " ❌ Failed to apply SendTrainerList compatibility fix"
|
||||
return 2
|
||||
fi
|
||||
else
|
||||
echo " ✅ SendTrainerList compatibility fix already present"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Apply all patches
|
||||
patch_count=0
|
||||
if apply_movepath_patch; then
|
||||
patch_count=$((patch_count + 1))
|
||||
if [ "$APPLY_MOVEPATH_PATCH" = "1" ]; then
|
||||
if apply_movepath_patch; then
|
||||
patch_count=$((patch_count + 1))
|
||||
fi
|
||||
fi
|
||||
if [ "$APPLY_SENDTRAINERLIST_PATCH" = "1" ]; then
|
||||
if apply_sendtrainerlist_patch; then
|
||||
patch_count=$((patch_count + 1))
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $patch_count -eq 0 ]; then
|
||||
|
||||
@@ -80,7 +80,7 @@ def cmd_list(directory: Path) -> int:
|
||||
profiles.sort(key=lambda item: item[4])
|
||||
|
||||
for name, modules, label, description, order in profiles:
|
||||
modules_csv = ",".join(modules)
|
||||
modules_csv = ",".join(modules) if modules else "-"
|
||||
print("\t".join([name, modules_csv, label, description, str(order)]))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ CATEGORY_BY_TYPE = {
|
||||
"data": "data",
|
||||
"cpp": "uncategorized",
|
||||
}
|
||||
USER_AGENT = "acore-compose-module-manifest"
|
||||
USER_AGENT = "azerothcore-realmmaster-module-manifest"
|
||||
|
||||
|
||||
def parse_args(argv: Sequence[str]) -> argparse.Namespace:
|
||||
|
||||
76
setup.sh
76
setup.sh
@@ -1139,12 +1139,29 @@ fi
|
||||
MODE_PRESET_NAME="$CLI_MODULE_PRESET"
|
||||
fi
|
||||
|
||||
# Function to determine source branch for a preset
|
||||
get_preset_source_branch() {
|
||||
local preset_name="$1"
|
||||
local preset_modules="${MODULE_PRESET_CONFIGS[$preset_name]:-}"
|
||||
|
||||
# Check if playerbots module is in the preset
|
||||
if [[ "$preset_modules" == *"MODULE_PLAYERBOTS"* ]]; then
|
||||
echo "azerothcore-playerbots"
|
||||
else
|
||||
echo "azerothcore-wotlk"
|
||||
fi
|
||||
}
|
||||
|
||||
# Module config
|
||||
say HEADER "MODULE PRESET"
|
||||
echo "1) ${MODULE_PRESET_LABELS[$DEFAULT_PRESET_SUGGESTED]:-⭐ Suggested Modules}"
|
||||
echo "2) ${MODULE_PRESET_LABELS[$DEFAULT_PRESET_PLAYERBOTS]:-🤖 Playerbots + Suggested modules}"
|
||||
echo "3) ⚙️ Manual selection"
|
||||
echo "4) 🚫 No modules"
|
||||
printf " %s) %s\n" "1" "⭐ Suggested Modules"
|
||||
printf " %s (%s)\n" "Baseline solo-friendly quality of life mix" "azerothcore-wotlk"
|
||||
printf " %s) %s\n" "2" "🤖 Playerbots + Suggested modules"
|
||||
printf " %s (%s)\n" "Suggested stack plus playerbots enabled" "azerothcore-playerbots"
|
||||
printf " %s) %s\n" "3" "⚙️ Manual selection"
|
||||
printf " %s (%s)\n" "Choose individual modules manually" "(depends on modules)"
|
||||
printf " %s) %s\n" "4" "🚫 No modules"
|
||||
printf " %s (%s)\n" "Pure AzerothCore with no modules" "azerothcore-wotlk"
|
||||
|
||||
local menu_index=5
|
||||
declare -A MENU_PRESET_INDEX=()
|
||||
@@ -1163,13 +1180,16 @@ fi
|
||||
for entry in "${ORDERED_PRESETS[@]}"; do
|
||||
local preset_name="${entry#*::}"
|
||||
[ -n "${MODULE_PRESET_CONFIGS[$preset_name]:-}" ] || continue
|
||||
local pretty_name
|
||||
local pretty_name preset_desc
|
||||
if [ -n "${MODULE_PRESET_LABELS[$preset_name]:-}" ]; then
|
||||
pretty_name="${MODULE_PRESET_LABELS[$preset_name]}"
|
||||
else
|
||||
pretty_name=$(echo "$preset_name" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++){$i=toupper(substr($i,1,1)) substr($i,2)}}1')
|
||||
fi
|
||||
echo "${menu_index}) ${pretty_name} (config/module-profiles/${preset_name}.json)"
|
||||
preset_desc="${MODULE_PRESET_DESCRIPTIONS[$preset_name]:-No description available}"
|
||||
local source_branch=$(get_preset_source_branch "$preset_name")
|
||||
printf " %s) %s\n" "$menu_index" "$pretty_name"
|
||||
printf " %s (%s)\n" "$preset_desc" "$source_branch"
|
||||
MENU_PRESET_INDEX[$menu_index]="$preset_name"
|
||||
menu_index=$((menu_index + 1))
|
||||
done
|
||||
@@ -1467,11 +1487,16 @@ fi
|
||||
MODULES_CPP_LIST="$(IFS=','; printf '%s' "${enabled_cpp_module_keys[*]}")"
|
||||
fi
|
||||
|
||||
local STACK_IMAGE_MODE="standard"
|
||||
# Determine source variant based ONLY on playerbots module
|
||||
local STACK_SOURCE_VARIANT="core"
|
||||
if [ "$MODULE_PLAYERBOTS" = "1" ] || [ "$PLAYERBOT_ENABLED" = "1" ]; then
|
||||
STACK_IMAGE_MODE="playerbots"
|
||||
STACK_SOURCE_VARIANT="playerbots"
|
||||
fi
|
||||
|
||||
# Determine image mode based on source variant and build requirements
|
||||
local STACK_IMAGE_MODE="standard"
|
||||
if [ "$STACK_SOURCE_VARIANT" = "playerbots" ]; then
|
||||
STACK_IMAGE_MODE="playerbots"
|
||||
elif [ "$NEEDS_CXX_REBUILD" = "1" ]; then
|
||||
STACK_IMAGE_MODE="modules"
|
||||
fi
|
||||
@@ -1567,7 +1592,7 @@ fi
|
||||
fi
|
||||
|
||||
local default_source_rel="${LOCAL_STORAGE_ROOT}/source/azerothcore"
|
||||
if [ "$NEEDS_CXX_REBUILD" = "1" ] || [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||
if [ "$STACK_SOURCE_VARIANT" = "playerbots" ]; then
|
||||
default_source_rel="${LOCAL_STORAGE_ROOT}/source/azerothcore-playerbots"
|
||||
fi
|
||||
|
||||
@@ -1661,6 +1686,15 @@ COMPOSE_PROJECT_NAME=$DEFAULT_COMPOSE_PROJECT_NAME
|
||||
|
||||
STORAGE_PATH=$STORAGE_PATH
|
||||
STORAGE_PATH_LOCAL=$LOCAL_STORAGE_ROOT
|
||||
STORAGE_CONFIG_PATH=$(get_template_value "STORAGE_CONFIG_PATH")
|
||||
STORAGE_LOGS_PATH=$(get_template_value "STORAGE_LOGS_PATH")
|
||||
STORAGE_MODULES_PATH=$(get_template_value "STORAGE_MODULES_PATH")
|
||||
STORAGE_LUA_SCRIPTS_PATH=$(get_template_value "STORAGE_LUA_SCRIPTS_PATH")
|
||||
STORAGE_MODULES_META_PATH=$(get_template_value "STORAGE_MODULES_META_PATH")
|
||||
STORAGE_MODULE_SQL_PATH=$(get_template_value "STORAGE_MODULE_SQL_PATH")
|
||||
STORAGE_INSTALL_MARKERS_PATH=$(get_template_value "STORAGE_INSTALL_MARKERS_PATH")
|
||||
STORAGE_CLIENT_DATA_PATH=$(get_template_value "STORAGE_CLIENT_DATA_PATH")
|
||||
STORAGE_LOCAL_SOURCE_PATH=$(get_template_value "STORAGE_LOCAL_SOURCE_PATH")
|
||||
BACKUP_PATH=$BACKUP_PATH
|
||||
TZ=$DEFAULT_TZ
|
||||
|
||||
@@ -1729,10 +1763,31 @@ CONTAINER_USER=$CONTAINER_USER
|
||||
CONTAINER_MYSQL=$DEFAULT_CONTAINER_MYSQL
|
||||
CONTAINER_DB_IMPORT=$DEFAULT_CONTAINER_DB_IMPORT
|
||||
CONTAINER_DB_INIT=$DEFAULT_CONTAINER_DB_INIT
|
||||
CONTAINER_DB_GUARD=$(get_template_value "CONTAINER_DB_GUARD")
|
||||
CONTAINER_BACKUP=$DEFAULT_CONTAINER_BACKUP
|
||||
CONTAINER_MODULES=$DEFAULT_CONTAINER_MODULES
|
||||
CONTAINER_POST_INSTALL=$DEFAULT_CONTAINER_POST_INSTALL
|
||||
|
||||
# Database Guard Defaults
|
||||
DB_GUARD_RECHECK_SECONDS=$(get_template_value "DB_GUARD_RECHECK_SECONDS")
|
||||
DB_GUARD_RETRY_SECONDS=$(get_template_value "DB_GUARD_RETRY_SECONDS")
|
||||
DB_GUARD_WAIT_ATTEMPTS=$(get_template_value "DB_GUARD_WAIT_ATTEMPTS")
|
||||
DB_GUARD_HEALTH_MAX_AGE=$(get_template_value "DB_GUARD_HEALTH_MAX_AGE")
|
||||
DB_GUARD_HEALTHCHECK_INTERVAL=$(get_template_value "DB_GUARD_HEALTHCHECK_INTERVAL")
|
||||
DB_GUARD_HEALTHCHECK_TIMEOUT=$(get_template_value "DB_GUARD_HEALTHCHECK_TIMEOUT")
|
||||
DB_GUARD_HEALTHCHECK_RETRIES=$(get_template_value "DB_GUARD_HEALTHCHECK_RETRIES")
|
||||
DB_GUARD_VERIFY_INTERVAL_SECONDS=$(get_template_value "DB_GUARD_VERIFY_INTERVAL_SECONDS")
|
||||
|
||||
# Module SQL staging
|
||||
STAGE_PATH_MODULE_SQL=$(get_template_value "STAGE_PATH_MODULE_SQL")
|
||||
|
||||
# Modules rebuild source path
|
||||
MODULES_REBUILD_SOURCE_PATH=$MODULES_REBUILD_SOURCE_PATH
|
||||
|
||||
# SQL Source Overlay
|
||||
SOURCE_DIR=$(get_template_value "SOURCE_DIR")
|
||||
AC_SQL_SOURCE_PATH=$(get_template_value "AC_SQL_SOURCE_PATH")
|
||||
|
||||
# Ports
|
||||
AUTH_EXTERNAL_PORT=$AUTH_EXTERNAL_PORT
|
||||
AUTH_PORT=$DEFAULT_AUTH_INTERNAL_PORT
|
||||
@@ -1749,6 +1804,8 @@ REALM_PORT=$REALM_PORT
|
||||
BACKUP_RETENTION_DAYS=$BACKUP_RETENTION_DAYS
|
||||
BACKUP_RETENTION_HOURS=$BACKUP_RETENTION_HOURS
|
||||
BACKUP_DAILY_TIME=$BACKUP_DAILY_TIME
|
||||
BACKUP_INTERVAL_MINUTES=$(get_template_value "BACKUP_INTERVAL_MINUTES")
|
||||
BACKUP_EXTRA_DATABASES=$(get_template_value "BACKUP_EXTRA_DATABASES")
|
||||
BACKUP_HEALTHCHECK_MAX_MINUTES=$BACKUP_HEALTHCHECK_MAX_MINUTES
|
||||
BACKUP_HEALTHCHECK_GRACE_SECONDS=$BACKUP_HEALTHCHECK_GRACE_SECONDS
|
||||
|
||||
@@ -1763,7 +1820,6 @@ EOF
|
||||
fi
|
||||
done
|
||||
cat <<EOF
|
||||
MODULES_REBUILD_SOURCE_PATH=$MODULES_REBUILD_SOURCE_PATH
|
||||
|
||||
# Client data
|
||||
CLIENT_DATA_VERSION=${CLIENT_DATA_VERSION:-$DEFAULT_CLIENT_DATA_VERSION}
|
||||
|
||||
Reference in New Issue
Block a user