mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
Improve MySQL runtime settings and playerbot-aware staging
This commit is contained in:
32
deploy.sh
32
deploy.sh
@@ -17,26 +17,26 @@ KEEP_RUNNING=0
|
||||
SKIP_REBUILD=0
|
||||
|
||||
BLUE='\033[0;34m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; RED='\033[0;31m'; NC='\033[0m'
|
||||
info(){ echo -e "${BLUE}ℹ️ $*${NC}"; }
|
||||
ok(){ echo -e "${GREEN}✅ $*${NC}"; }
|
||||
warn(){ echo -e "${YELLOW}⚠️ $*${NC}"; }
|
||||
err(){ echo -e "${RED}❌ $*${NC}"; }
|
||||
info(){ printf '%b\n' "${BLUE}ℹ️ $*${NC}"; }
|
||||
ok(){ printf '%b\n' "${GREEN}✅ $*${NC}"; }
|
||||
warn(){ printf '%b\n' "${YELLOW}⚠️ $*${NC}"; }
|
||||
err(){ printf '%b\n' "${RED}❌ $*${NC}"; }
|
||||
|
||||
show_deployment_header(){
|
||||
echo -e "\n${BLUE} ⚔️ AZEROTHCORE REALM DEPLOYMENT ⚔️${NC}"
|
||||
echo -e "${BLUE} ════════════════════════════════════${NC}"
|
||||
echo -e "${BLUE} 🏰 Bringing Your Realm Online 🏰${NC}\n"
|
||||
printf '\n%b\n' "${BLUE}⚔️ AZEROTHCORE REALM DEPLOYMENT ⚔️${NC}"
|
||||
printf '%b\n' "${BLUE}════════════════════════════════════════${NC}"
|
||||
printf '%b\n\n' "${BLUE}🏰 Bringing Your Realm Online 🏰${NC}"
|
||||
}
|
||||
|
||||
show_step(){
|
||||
local step="$1" total="$2" message="$3"
|
||||
echo -e "${YELLOW}🔧 Step ${step}/${total}: ${message}...${NC}"
|
||||
printf '%b\n' "${YELLOW}🔧 Step ${step}/${total}: ${message}...${NC}"
|
||||
}
|
||||
|
||||
show_realm_ready(){
|
||||
echo -e "\n${GREEN}⚔️ The realm has been forged! ⚔️${NC}"
|
||||
echo -e "${GREEN}🏰 Adventurers may now enter your world${NC}"
|
||||
echo -e "${GREEN}🗡️ May your server bring epic adventures!${NC}\n"
|
||||
printf '\n%b\n' "${GREEN}⚔️ The realm has been forged! ⚔️${NC}"
|
||||
printf '%b\n' "${GREEN}🏰 Adventurers may now enter your world${NC}"
|
||||
printf '%b\n\n' "${GREEN}🗡️ May your server bring epic adventures!${NC}"
|
||||
}
|
||||
|
||||
usage(){
|
||||
@@ -171,6 +171,16 @@ rebuild_source(){
|
||||
}
|
||||
|
||||
tag_module_images(){
|
||||
local module_playerbots
|
||||
local playerbot_enabled
|
||||
module_playerbots="$(read_env MODULE_PLAYERBOTS "0")"
|
||||
playerbot_enabled="$(read_env PLAYERBOT_ENABLED "0")"
|
||||
|
||||
if [ "$module_playerbots" = "1" ] || [ "$playerbot_enabled" = "1" ]; then
|
||||
info "Playerbot mode detected; skipping module image tagging."
|
||||
return
|
||||
fi
|
||||
|
||||
local source_world="acore/ac-wotlk-worldserver:master"
|
||||
local source_auth="acore/ac-wotlk-authserver:master"
|
||||
local target_world
|
||||
|
||||
@@ -7,14 +7,14 @@ set -e
|
||||
BLUE='\033[0;34m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; NC='\033[0m'
|
||||
|
||||
show_staging_header(){
|
||||
echo -e "\n${BLUE} ⚔️ REALM STAGING SYSTEM ⚔️${NC}"
|
||||
echo -e "${BLUE} ══════════════════════════════${NC}"
|
||||
echo -e "${BLUE} 🎯 Configuring Your Realm 🎯${NC}\n"
|
||||
printf '\n%b\n' "${BLUE}⚔️ REALM STAGING SYSTEM ⚔️${NC}"
|
||||
printf '%b\n' "${BLUE}══════════════════════════════${NC}"
|
||||
printf '%b\n\n' "${BLUE}🎯 Configuring Your Realm 🎯${NC}"
|
||||
}
|
||||
|
||||
show_staging_step(){
|
||||
local step="$1" message="$2"
|
||||
echo -e "${YELLOW}🔧 ${step}: ${message}...${NC}"
|
||||
printf '%b\n' "${YELLOW}🔧 ${step}: ${message}...${NC}"
|
||||
}
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
@@ -147,16 +147,19 @@ MODULE_PLAYERBOTS="$(read_env MODULE_PLAYERBOTS "0")"
|
||||
# Determine target profile if not specified
|
||||
if [ -z "$TARGET_PROFILE" ]; then
|
||||
show_staging_step "Profile Detection" "Analyzing enabled modules"
|
||||
if [ ${#compile_modules[@]} -gt 0 ]; then
|
||||
if [ "$MODULE_PLAYERBOTS" = "1" ] || [ "$PLAYERBOT_ENABLED" = "1" ]; then
|
||||
TARGET_PROFILE="playerbots"
|
||||
echo "🤖 Playerbot profile enabled"
|
||||
if [ ${#compile_modules[@]} -gt 0 ]; then
|
||||
echo " ⚠️ Detected ${#compile_modules[@]} C++ modules. Ensure your playerbot images include these features."
|
||||
fi
|
||||
elif [ ${#compile_modules[@]} -gt 0 ]; then
|
||||
echo "🔧 Detected ${#compile_modules[@]} C++ modules requiring compilation:"
|
||||
for mod in "${compile_modules[@]}"; do
|
||||
echo " • $mod"
|
||||
done
|
||||
TARGET_PROFILE="modules"
|
||||
echo "🧩 Using modules profile for custom source build"
|
||||
elif [ "$MODULE_PLAYERBOTS" = "1" ] || [ "$PLAYERBOT_ENABLED" = "1" ]; then
|
||||
TARGET_PROFILE="playerbots"
|
||||
echo "🤖 Playerbot profile enabled"
|
||||
else
|
||||
TARGET_PROFILE="standard"
|
||||
echo "✅ No special modules detected - using standard profile"
|
||||
@@ -204,12 +207,13 @@ docker compose \
|
||||
--profile services-standard \
|
||||
--profile services-playerbots \
|
||||
--profile services-modules \
|
||||
--profile tools \
|
||||
--profile client-data \
|
||||
--profile client-data-bots \
|
||||
down 2>/dev/null || true
|
||||
|
||||
# Build list of profiles to start
|
||||
PROFILE_ARGS=(--profile "services-$TARGET_PROFILE" --profile db --profile modules)
|
||||
PROFILE_ARGS=(--profile "services-$TARGET_PROFILE" --profile db --profile modules --profile tools)
|
||||
case "$TARGET_PROFILE" in
|
||||
standard) PROFILE_ARGS+=(--profile client-data) ;;
|
||||
playerbots) PROFILE_ARGS+=(--profile client-data-bots) ;;
|
||||
@@ -221,12 +225,11 @@ show_staging_step "Realm Activation" "Bringing services online"
|
||||
echo "🟢 Starting services-$TARGET_PROFILE profile..."
|
||||
docker compose "${PROFILE_ARGS[@]}" up -d
|
||||
|
||||
echo ""
|
||||
echo -e "${GREEN}⚔️ Realm staging completed successfully! ⚔️${NC}"
|
||||
echo -e "${GREEN}🏰 Profile: services-$TARGET_PROFILE${NC}"
|
||||
echo -e "${GREEN}🗡️ Your realm is ready for adventure!${NC}"
|
||||
printf '\n%b\n' "${GREEN}⚔️ Realm staging completed successfully! ⚔️${NC}"
|
||||
printf '%b\n' "${GREEN}🏰 Profile: services-$TARGET_PROFILE${NC}"
|
||||
printf '%b\n' "${GREEN}🗡️ Your realm is ready for adventure!${NC}"
|
||||
|
||||
# Show status
|
||||
echo ""
|
||||
printf '\n'
|
||||
echo "📊 Service Status:"
|
||||
docker compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Ports}}" | grep -E "(ac-worldserver|ac-authserver|NAME)" || true
|
||||
docker compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Ports}}" | grep -E "(ac-worldserver|ac-authserver|ac-phpmyadmin|ac-keira3|NAME)" || true
|
||||
|
||||
Reference in New Issue
Block a user