Files
AzerothCore-RealmMaster/scripts/bash/start-containers.sh
2025-11-09 03:41:44 -05:00

41 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Thin wrapper to bring the AzerothCore stack online without triggering rebuilds.
# Picks the right profile automatically (standard/playerbots/modules) and delegates
# to deploy.sh so all staging/health logic stays consistent.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
PROFILE="$(python3 - <<'PY' "$PROJECT_ROOT"
import json, subprocess, sys
from pathlib import Path
root = Path(sys.argv[1])
modules_py = root / "scripts" / "python" / "modules.py"
env_path = root / ".env"
manifest_path = root / "config" / "module-manifest.json"
state = json.loads(subprocess.check_output([
sys.executable,
str(modules_py),
"--env-path", str(env_path),
"--manifest", str(manifest_path),
"dump", "--format", "json",
]))
enabled = [m for m in state["modules"] if m["enabled"]]
profile = "standard"
if any(m["key"] == "MODULE_PLAYERBOTS" and m["enabled"] for m in enabled):
profile = "playerbots"
elif any(m["needs_build"] and m["enabled"] for m in enabled):
profile = "modules"
print(profile)
PY
)"
exec "${PROJECT_ROOT}/deploy.sh" --profile "$PROFILE" --yes --no-watch