mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-24 14:06:23 +00:00
Compare commits
1 Commits
main
...
ae23bc2146
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae23bc2146 |
@@ -29,15 +29,10 @@ COMPOSE_PROJECT_NAME=azerothcore-realmmaster
|
|||||||
# Module Profile Selection
|
# Module Profile Selection
|
||||||
# =====================
|
# =====================
|
||||||
# Choose which module profile build to use:
|
# Choose which module profile build to use:
|
||||||
# - realmmaster: 32 modules (playerbots, transmog, solo-lfg, eluna, etc.) - ✅ Available now (Recommended)
|
# - realmmaster: 32 modules (playerbots, transmog, solo-lfg, eluna, etc.) - Recommended
|
||||||
#
|
|
||||||
# Additional profiles (available soon - will be built on demand):
|
|
||||||
# - suggested-modules: Alternative suggested module set
|
# - suggested-modules: Alternative suggested module set
|
||||||
# - all-modules: All supported modules
|
# - all-modules: All supported modules
|
||||||
# - playerbots-only: Just playerbots
|
# - playerbots-only: Just playerbots
|
||||||
#
|
|
||||||
# Note: Only 'realmmaster' images are currently published to Docker Hub.
|
|
||||||
# Other profiles will be available when built via GitHub Actions workflow.
|
|
||||||
MODULE_PROFILE=realmmaster
|
MODULE_PROFILE=realmmaster
|
||||||
|
|
||||||
# =====================
|
# =====================
|
||||||
@@ -60,11 +55,6 @@ AC_WORLDSERVER_IMAGE_MODULES=${DOCKERHUB_USERNAME}/${COMPOSE_PROJECT_NAME}:world
|
|||||||
AC_AUTHSERVER_IMAGE=acore/ac-wotlk-authserver:master
|
AC_AUTHSERVER_IMAGE=acore/ac-wotlk-authserver:master
|
||||||
AC_WORLDSERVER_IMAGE=acore/ac-wotlk-worldserver:master
|
AC_WORLDSERVER_IMAGE=acore/ac-wotlk-worldserver:master
|
||||||
|
|
||||||
# Playerbots images (referenced by docker-compose, even if using modules profile)
|
|
||||||
AC_AUTHSERVER_IMAGE_PLAYERBOTS=${COMPOSE_PROJECT_NAME}:authserver-playerbots
|
|
||||||
AC_WORLDSERVER_IMAGE_PLAYERBOTS=${COMPOSE_PROJECT_NAME}:worldserver-playerbots
|
|
||||||
AC_CLIENT_DATA_IMAGE_PLAYERBOTS=${COMPOSE_PROJECT_NAME}:client-data-playerbots
|
|
||||||
|
|
||||||
# Database and client data images
|
# Database and client data images
|
||||||
AC_DB_IMPORT_IMAGE=acore/ac-wotlk-db-import:master
|
AC_DB_IMPORT_IMAGE=acore/ac-wotlk-db-import:master
|
||||||
AC_CLIENT_DATA_IMAGE=acore/ac-wotlk-client-data:master
|
AC_CLIENT_DATA_IMAGE=acore/ac-wotlk-client-data:master
|
||||||
@@ -193,11 +183,6 @@ BACKUP_HEALTHCHECK_GRACE_SECONDS=4500
|
|||||||
# These settings tell the system that modules are already built into the images
|
# These settings tell the system that modules are already built into the images
|
||||||
STACK_IMAGE_MODE=modules
|
STACK_IMAGE_MODE=modules
|
||||||
STACK_SOURCE_VARIANT=playerbots
|
STACK_SOURCE_VARIANT=playerbots
|
||||||
|
|
||||||
# Key modules enabled (needed for profile detection)
|
|
||||||
# The RealmMaster profile includes playerbots, so we need this set for deploy.sh to use the correct profile
|
|
||||||
MODULE_PLAYERBOTS=1
|
|
||||||
|
|
||||||
# Note: MODULES_ENABLED_LIST varies by profile - the list below is for the 'realmmaster' profile
|
# Note: MODULES_ENABLED_LIST varies by profile - the list below is for the 'realmmaster' profile
|
||||||
# For other profiles, see the corresponding JSON in config/module-profiles/
|
# For other profiles, see the corresponding JSON in config/module-profiles/
|
||||||
MODULES_ENABLED_LIST=MODULE_PLAYERBOTS,MODULE_TRANSMOG,MODULE_SOLO_LFG,MODULE_ELUNA,MODULE_AIO,MODULE_NPC_BUFFER,MODULE_NPC_BEASTMASTER,MODULE_SOLOCRAFT,MODULE_1V1_ARENA,MODULE_ACCOUNT_ACHIEVEMENTS,MODULE_ACTIVE_CHAT,MODULE_ARAC,MODULE_ASSISTANT,MODULE_AUTO_REVIVE,MODULE_BLACK_MARKET_AUCTION_HOUSE,MODULE_BOSS_ANNOUNCER,MODULE_BREAKING_NEWS,MODULE_ELUNA_SCRIPTS,MODULE_EVENT_SCRIPTS,MODULE_FIREWORKS,MODULE_GAIN_HONOR_GUARD,MODULE_GLOBAL_CHAT,MODULE_GUILDHOUSE,MODULE_INSTANCE_RESET,MODULE_ITEM_LEVEL_UP,MODULE_LEARN_SPELLS,MODULE_MORPHSUMMON,MODULE_NPC_ENCHANTER,MODULE_NPC_FREE_PROFESSIONS,MODULE_RANDOM_ENCHANTS,MODULE_REAGENT_BANK,MODULE_TIME_IS_TIME
|
MODULES_ENABLED_LIST=MODULE_PLAYERBOTS,MODULE_TRANSMOG,MODULE_SOLO_LFG,MODULE_ELUNA,MODULE_AIO,MODULE_NPC_BUFFER,MODULE_NPC_BEASTMASTER,MODULE_SOLOCRAFT,MODULE_1V1_ARENA,MODULE_ACCOUNT_ACHIEVEMENTS,MODULE_ACTIVE_CHAT,MODULE_ARAC,MODULE_ASSISTANT,MODULE_AUTO_REVIVE,MODULE_BLACK_MARKET_AUCTION_HOUSE,MODULE_BOSS_ANNOUNCER,MODULE_BREAKING_NEWS,MODULE_ELUNA_SCRIPTS,MODULE_EVENT_SCRIPTS,MODULE_FIREWORKS,MODULE_GAIN_HONOR_GUARD,MODULE_GLOBAL_CHAT,MODULE_GUILDHOUSE,MODULE_INSTANCE_RESET,MODULE_ITEM_LEVEL_UP,MODULE_LEARN_SPELLS,MODULE_MORPHSUMMON,MODULE_NPC_ENCHANTER,MODULE_NPC_FREE_PROFESSIONS,MODULE_RANDOM_ENCHANTS,MODULE_REAGENT_BANK,MODULE_TIME_IS_TIME
|
||||||
|
|||||||
@@ -559,6 +559,3 @@ MODULE_MOD_PYTHON_ENGINE=0
|
|||||||
MODULE_WRATH_OF_THE_VANILLA_V2=0
|
MODULE_WRATH_OF_THE_VANILLA_V2=0
|
||||||
MODULE_DUELS=0
|
MODULE_DUELS=0
|
||||||
MODULE_WOW_CORE=0
|
MODULE_WOW_CORE=0
|
||||||
MODULE_CLANCENTAUR=0
|
|
||||||
MODULE_DELVES=0
|
|
||||||
MODULE_MOD_DISABLE_ACHIEVEMENTS=0
|
|
||||||
|
|||||||
10
.github/workflows/build-and-publish.yml
vendored
10
.github/workflows/build-and-publish.yml
vendored
@@ -118,14 +118,6 @@ jobs:
|
|||||||
grep '^STORAGE_PATH_LOCAL=' .env || echo " STORAGE_PATH_LOCAL not found"
|
grep '^STORAGE_PATH_LOCAL=' .env || echo " STORAGE_PATH_LOCAL not found"
|
||||||
grep '^MODULES_REBUILD_SOURCE_PATH=' .env || echo " MODULES_REBUILD_SOURCE_PATH not found"
|
grep '^MODULES_REBUILD_SOURCE_PATH=' .env || echo " MODULES_REBUILD_SOURCE_PATH not found"
|
||||||
grep '^STACK_SOURCE_VARIANT=' .env || echo " STACK_SOURCE_VARIANT not found"
|
grep '^STACK_SOURCE_VARIANT=' .env || echo " STACK_SOURCE_VARIANT not found"
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Verify all Docker images are configured
|
|
||||||
echo "🐳 Docker Images (that we build and push):"
|
|
||||||
grep -E '^AC_AUTHSERVER_IMAGE_PLAYERBOTS=' .env || echo " AC_AUTHSERVER_IMAGE_PLAYERBOTS not found"
|
|
||||||
grep -E '^AC_WORLDSERVER_IMAGE_PLAYERBOTS=' .env || echo " AC_WORLDSERVER_IMAGE_PLAYERBOTS not found"
|
|
||||||
grep -E '^AC_AUTHSERVER_IMAGE_MODULES=' .env || echo " AC_AUTHSERVER_IMAGE_MODULES not found"
|
|
||||||
grep -E '^AC_WORLDSERVER_IMAGE_MODULES=' .env || echo " AC_WORLDSERVER_IMAGE_MODULES not found"
|
|
||||||
|
|
||||||
- name: Cache Go build cache
|
- name: Cache Go build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -230,7 +222,7 @@ jobs:
|
|||||||
echo "<summary>View enabled modules</summary>" >> $GITHUB_STEP_SUMMARY
|
echo "<summary>View enabled modules</summary>" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||||
grep '^MODULE_.*=1' .env | sed 's/=1//' >> $GITHUB_STEP_SUMMARY || true
|
grep '^MODULE_.*=1' .env | sed 's/=1//' || true >> $GITHUB_STEP_SUMMARY
|
||||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "</details>" >> $GITHUB_STEP_SUMMARY
|
echo "</details>" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|||||||
246
.github/workflows/create-release.yml
vendored
246
.github/workflows/create-release.yml
vendored
@@ -1,246 +0,0 @@
|
|||||||
name: Create Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
description: 'Release version (e.g., v1.0.0)'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
profile:
|
|
||||||
description: 'Module profile for this release'
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: 'RealmMaster'
|
|
||||||
prerelease:
|
|
||||||
description: 'Mark as pre-release'
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
create-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Prepare release variables
|
|
||||||
run: |
|
|
||||||
VERSION="${{ github.event.inputs.version }}"
|
|
||||||
PROFILE="${{ github.event.inputs.profile }}"
|
|
||||||
PROFILE_TAG=$(echo "${PROFILE}" | tr '[:upper:]' '[:lower:]' | tr '_' '-')
|
|
||||||
|
|
||||||
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
|
||||||
echo "PROFILE=${PROFILE}" >> $GITHUB_ENV
|
|
||||||
echo "PROFILE_TAG=${PROFILE_TAG}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Get build date from Docker Hub image (or use current date)
|
|
||||||
BUILD_DATE=$(date +%Y%m%d)
|
|
||||||
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Get AzerothCore commit from local-storage if available
|
|
||||||
if [ -d "local-storage/source/azerothcore-playerbots" ]; then
|
|
||||||
ACORE_COMMIT=$(cd local-storage/source/azerothcore-playerbots && git rev-parse --short HEAD)
|
|
||||||
else
|
|
||||||
ACORE_COMMIT="unknown"
|
|
||||||
fi
|
|
||||||
echo "ACORE_COMMIT=${ACORE_COMMIT}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Read module list from profile
|
|
||||||
run: |
|
|
||||||
PROFILE_FILE="config/module-profiles/${PROFILE}.json"
|
|
||||||
|
|
||||||
if [ ! -f "$PROFILE_FILE" ]; then
|
|
||||||
echo "ERROR: Profile file not found: $PROFILE_FILE"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Extract module count
|
|
||||||
MODULE_COUNT=$(python3 -c "import json; data=json.load(open('$PROFILE_FILE')); print(len(data.get('modules', [])))")
|
|
||||||
echo "MODULE_COUNT=${MODULE_COUNT}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Extract modules for release notes
|
|
||||||
python3 -c "import json; data=json.load(open('$PROFILE_FILE')); print('\n'.join(['- ' + m for m in data.get('modules', [])]))" > modules.txt
|
|
||||||
|
|
||||||
- name: Create deployment package
|
|
||||||
run: |
|
|
||||||
PACKAGE_NAME="azerothcore-realmmaster-${VERSION}-${PROFILE_TAG}"
|
|
||||||
mkdir -p "${PACKAGE_NAME}"
|
|
||||||
|
|
||||||
# Copy essential deployment files
|
|
||||||
cp .env.prebuilt "${PACKAGE_NAME}/.env.prebuilt"
|
|
||||||
cp docker-compose.yml "${PACKAGE_NAME}/docker-compose.yml"
|
|
||||||
cp deploy.sh "${PACKAGE_NAME}/deploy.sh"
|
|
||||||
cp status.sh "${PACKAGE_NAME}/status.sh"
|
|
||||||
cp cleanup.sh "${PACKAGE_NAME}/cleanup.sh"
|
|
||||||
cp README.md "${PACKAGE_NAME}/README.md"
|
|
||||||
|
|
||||||
# Copy scripts directory
|
|
||||||
cp -r scripts "${PACKAGE_NAME}/scripts"
|
|
||||||
|
|
||||||
# Copy config directory
|
|
||||||
cp -r config "${PACKAGE_NAME}/config"
|
|
||||||
|
|
||||||
# Copy docs directory
|
|
||||||
cp -r docs "${PACKAGE_NAME}/docs"
|
|
||||||
|
|
||||||
# Create a quick start guide specific to this release
|
|
||||||
{
|
|
||||||
echo "# Quick Start - AzerothCore RealmMaster ${VERSION}"
|
|
||||||
echo ""
|
|
||||||
echo "## Module Profile: ${PROFILE}"
|
|
||||||
echo "${MODULE_COUNT} modules included"
|
|
||||||
echo ""
|
|
||||||
echo "## Docker Images"
|
|
||||||
echo "This release uses the following pre-built images:"
|
|
||||||
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-${BUILD_DATE}\`"
|
|
||||||
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-${BUILD_DATE}\`"
|
|
||||||
echo ""
|
|
||||||
echo "Or use the latest tags:"
|
|
||||||
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-latest\`"
|
|
||||||
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-latest\`"
|
|
||||||
echo ""
|
|
||||||
echo "## Installation"
|
|
||||||
echo ""
|
|
||||||
echo "1. **Edit .env.prebuilt**:"
|
|
||||||
echo " \`\`\`bash"
|
|
||||||
echo " nano .env.prebuilt"
|
|
||||||
echo " # Set: DOCKERHUB_USERNAME=your-dockerhub-username"
|
|
||||||
echo " \`\`\`"
|
|
||||||
echo ""
|
|
||||||
echo "2. **Rename to .env**:"
|
|
||||||
echo " \`\`\`bash"
|
|
||||||
echo " mv .env.prebuilt .env"
|
|
||||||
echo " \`\`\`"
|
|
||||||
echo ""
|
|
||||||
echo "3. **Deploy**:"
|
|
||||||
echo " \`\`\`bash"
|
|
||||||
echo " chmod +x deploy.sh status.sh cleanup.sh"
|
|
||||||
echo " ./deploy.sh"
|
|
||||||
echo " \`\`\`"
|
|
||||||
echo ""
|
|
||||||
echo "4. **Check status**:"
|
|
||||||
echo " \`\`\`bash"
|
|
||||||
echo " ./status.sh"
|
|
||||||
echo " \`\`\`"
|
|
||||||
echo ""
|
|
||||||
echo "## Documentation"
|
|
||||||
echo "- [Pre-Built Images Guide](docs/PREBUILT_IMAGES.md)"
|
|
||||||
echo "- [Getting Started](docs/GETTING_STARTED.md)"
|
|
||||||
echo "- [Troubleshooting](docs/TROUBLESHOOTING.md)"
|
|
||||||
echo ""
|
|
||||||
echo "## Support"
|
|
||||||
echo "- GitHub Issues: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues"
|
|
||||||
echo "- AzerothCore Discord: https://discord.gg/gkt4y2x"
|
|
||||||
} > "${PACKAGE_NAME}/QUICKSTART.md"
|
|
||||||
|
|
||||||
# Make scripts executable
|
|
||||||
chmod +x "${PACKAGE_NAME}/deploy.sh"
|
|
||||||
chmod +x "${PACKAGE_NAME}/status.sh"
|
|
||||||
chmod +x "${PACKAGE_NAME}/cleanup.sh"
|
|
||||||
|
|
||||||
# Create zip archive
|
|
||||||
zip -r "${PACKAGE_NAME}.zip" "${PACKAGE_NAME}"
|
|
||||||
|
|
||||||
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Generate release notes
|
|
||||||
run: |
|
|
||||||
{
|
|
||||||
echo "# AzerothCore RealmMaster ${VERSION} - ${PROFILE} Profile"
|
|
||||||
echo ""
|
|
||||||
echo "## 🎯 Module Profile: ${PROFILE}"
|
|
||||||
echo "${MODULE_COUNT} modules included"
|
|
||||||
echo ""
|
|
||||||
echo "## 📦 Docker Images"
|
|
||||||
echo ""
|
|
||||||
echo "Pull these pre-built images from Docker Hub:"
|
|
||||||
echo ""
|
|
||||||
echo "**Date-specific (recommended for production)**:"
|
|
||||||
echo "\`\`\`bash"
|
|
||||||
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-${BUILD_DATE}"
|
|
||||||
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-${BUILD_DATE}"
|
|
||||||
echo "\`\`\`"
|
|
||||||
echo ""
|
|
||||||
echo "**Latest (auto-updated nightly)**:"
|
|
||||||
echo "\`\`\`bash"
|
|
||||||
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-latest"
|
|
||||||
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-latest"
|
|
||||||
echo "\`\`\`"
|
|
||||||
echo ""
|
|
||||||
echo "## 🚀 Quick Start"
|
|
||||||
echo ""
|
|
||||||
echo "\`\`\`bash"
|
|
||||||
echo "# Download and extract"
|
|
||||||
echo "wget https://github.com/uprightbass360/AzerothCore-RealmMaster/releases/download/${VERSION}/${PACKAGE_NAME}.zip"
|
|
||||||
echo "unzip ${PACKAGE_NAME}.zip"
|
|
||||||
echo "cd ${PACKAGE_NAME}"
|
|
||||||
echo ""
|
|
||||||
echo "# Configure Docker Hub username"
|
|
||||||
echo "nano .env.prebuilt"
|
|
||||||
echo "# Set: DOCKERHUB_USERNAME=your-dockerhub-username"
|
|
||||||
echo ""
|
|
||||||
echo "# Deploy"
|
|
||||||
echo "mv .env.prebuilt .env"
|
|
||||||
echo "./deploy.sh"
|
|
||||||
echo "\`\`\`"
|
|
||||||
echo ""
|
|
||||||
echo "Full documentation in \`docs/PREBUILT_IMAGES.md\`"
|
|
||||||
echo ""
|
|
||||||
echo "## 📋 Included Modules"
|
|
||||||
echo ""
|
|
||||||
cat modules.txt
|
|
||||||
echo ""
|
|
||||||
echo "## 📊 Build Information"
|
|
||||||
echo ""
|
|
||||||
echo "- **Built**: ${BUILD_DATE}"
|
|
||||||
echo "- **AzerothCore Commit**: ${ACORE_COMMIT}"
|
|
||||||
echo "- **Source Variant**: playerbots (for MODULE_PLAYERBOTS support)"
|
|
||||||
echo "- **Profile**: ${PROFILE}"
|
|
||||||
echo "- **Module Count**: ${MODULE_COUNT}"
|
|
||||||
echo ""
|
|
||||||
echo "## 📖 Documentation"
|
|
||||||
echo ""
|
|
||||||
echo "Full documentation available in the \`docs/\` directory of the release package:"
|
|
||||||
echo "- [Pre-Built Images Guide](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/PREBUILT_IMAGES.md)"
|
|
||||||
echo "- [Getting Started Guide](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/GETTING_STARTED.md)"
|
|
||||||
echo "- [Module Catalog](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/MODULES.md)"
|
|
||||||
echo "- [Troubleshooting](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/TROUBLESHOOTING.md)"
|
|
||||||
echo ""
|
|
||||||
echo "## 🐛 Known Issues"
|
|
||||||
echo ""
|
|
||||||
echo "None at this time. Report issues at: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues"
|
|
||||||
echo ""
|
|
||||||
echo "## 💬 Support"
|
|
||||||
echo ""
|
|
||||||
echo "- **GitHub Issues**: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues"
|
|
||||||
echo "- **AzerothCore Discord**: https://discord.gg/gkt4y2x"
|
|
||||||
echo "- **Documentation**: https://github.com/uprightbass360/AzerothCore-RealmMaster/tree/${VERSION}/docs"
|
|
||||||
} > release_notes.md
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.VERSION }}
|
|
||||||
name: "RealmMaster ${{ env.VERSION }} - ${{ env.PROFILE }} Profile"
|
|
||||||
body_path: release_notes.md
|
|
||||||
files: |
|
|
||||||
${{ env.PACKAGE_NAME }}.zip
|
|
||||||
prerelease: ${{ github.event.inputs.prerelease }}
|
|
||||||
draft: false
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Release summary
|
|
||||||
run: |
|
|
||||||
echo "## Release Created Successfully! 🎉" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "**Version**: ${{ env.VERSION }}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "**Profile**: ${{ env.PROFILE }}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "**Modules**: ${{ env.MODULE_COUNT }}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "**Package**: ${{ env.PACKAGE_NAME }}.zip" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "📦 Release available at:" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "https://github.com/${{ github.repository }}/releases/tag/${{ env.VERSION }}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
@@ -5517,48 +5517,6 @@
|
|||||||
"requires": [],
|
"requires": [],
|
||||||
"post_install_hooks": [],
|
"post_install_hooks": [],
|
||||||
"config_cleanup": []
|
"config_cleanup": []
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "MODULE_DELVES",
|
|
||||||
"name": "Delves",
|
|
||||||
"repo": "https://github.com/araxiaonline/Delves.git",
|
|
||||||
"description": "List of the Custom Made Single Player Delves for Araxia Online",
|
|
||||||
"type": "lua",
|
|
||||||
"category": "scripting",
|
|
||||||
"notes": "Discovered via GitHub topic 'azerothcore-module'",
|
|
||||||
"status": "active",
|
|
||||||
"order": 5000,
|
|
||||||
"requires": [],
|
|
||||||
"post_install_hooks": [],
|
|
||||||
"config_cleanup": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "MODULE_CLANCENTAUR",
|
|
||||||
"name": "ClanCentaur",
|
|
||||||
"repo": "https://github.com/araxiaonline/ClanCentaur.git",
|
|
||||||
"description": "Custom SQL modifications and patch notes for new faction rewards, reputation items, and unique vendors on the Araxia WoW 3.3.5a server.",
|
|
||||||
"type": "sql",
|
|
||||||
"category": "database",
|
|
||||||
"notes": "Discovered via GitHub topic 'azerothcore-module'",
|
|
||||||
"status": "active",
|
|
||||||
"order": 5000,
|
|
||||||
"requires": [],
|
|
||||||
"post_install_hooks": [],
|
|
||||||
"config_cleanup": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "MODULE_MOD_DISABLE_ACHIEVEMENTS",
|
|
||||||
"name": "mod-disable-achievements",
|
|
||||||
"repo": "https://github.com/olive-spore-734/mod-disable-achievements.git",
|
|
||||||
"description": "SQL with a long list of WotLK Achievements and their IDs, which should make it much easier to find and disable some. Made for AzerothCore.",
|
|
||||||
"type": "sql",
|
|
||||||
"category": "database",
|
|
||||||
"notes": "Discovered via GitHub topic 'azerothcore-module'",
|
|
||||||
"status": "active",
|
|
||||||
"order": 5000,
|
|
||||||
"requires": [],
|
|
||||||
"post_install_hooks": [],
|
|
||||||
"config_cleanup": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
"MODULE_ARAC",
|
"MODULE_ARAC",
|
||||||
"MODULE_ASSISTANT",
|
"MODULE_ASSISTANT",
|
||||||
"MODULE_REAGENT_BANK",
|
"MODULE_REAGENT_BANK",
|
||||||
|
"MODULE_BLACK_MARKET_AUCTION_HOUSE",
|
||||||
"MODULE_ELUNA",
|
"MODULE_ELUNA",
|
||||||
"MODULE_AIO",
|
"MODULE_AIO",
|
||||||
"MODULE_ELUNA_SCRIPTS",
|
"MODULE_ELUNA_SCRIPTS",
|
||||||
"MODULE_LUA_AH_BOT",
|
|
||||||
"MODULE_EVENT_SCRIPTS",
|
"MODULE_EVENT_SCRIPTS",
|
||||||
"MODULE_ACTIVE_CHAT",
|
"MODULE_ACTIVE_CHAT",
|
||||||
"MODULE_GUILDHOUSE",
|
"MODULE_GUILDHOUSE",
|
||||||
|
|||||||
33
deploy.sh
33
deploy.sh
@@ -891,24 +891,6 @@ apply_server_config(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
update_realmlist(){
|
|
||||||
info "Updating realmlist in database with current SERVER_ADDRESS and REALM_PORT..."
|
|
||||||
|
|
||||||
local update_script="$ROOT_DIR/scripts/bash/update-realmlist.sh"
|
|
||||||
if [ ! -x "$update_script" ]; then
|
|
||||||
warn "Realmlist update script not found or not executable: $update_script"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run the update script
|
|
||||||
if bash "$update_script"; then
|
|
||||||
ok "Realmlist updated successfully"
|
|
||||||
else
|
|
||||||
warn "Could not update realmlist - this is normal if database is still initializing"
|
|
||||||
info "The realmlist will be updated on next deployment or you can run: ./scripts/bash/update-realmlist.sh"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main(){
|
main(){
|
||||||
if [ "$ASSUME_YES" -ne 1 ]; then
|
if [ "$ASSUME_YES" -ne 1 ]; then
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
@@ -965,32 +947,29 @@ main(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show_step 1 7 "Checking build requirements"
|
show_step 1 4 "Checking build requirements"
|
||||||
if ! prompt_build_if_needed; then
|
if ! prompt_build_if_needed; then
|
||||||
err "Build required but not completed. Deployment cancelled."
|
err "Build required but not completed. Deployment cancelled."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$KEEP_RUNNING" -ne 1 ]; then
|
if [ "$KEEP_RUNNING" -ne 1 ]; then
|
||||||
show_step 2 7 "Stopping runtime stack"
|
show_step 2 4 "Stopping runtime stack"
|
||||||
stop_runtime_stack
|
stop_runtime_stack
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show_step 3 7 "Importing user database files"
|
show_step 3 5 "Importing user database files"
|
||||||
info "Checking for database files in ./import/db/ and ./database-import/"
|
info "Checking for database files in ./import/db/ and ./database-import/"
|
||||||
bash "$ROOT_DIR/scripts/bash/import-database-files.sh"
|
bash "$ROOT_DIR/scripts/bash/import-database-files.sh"
|
||||||
|
|
||||||
show_step 4 7 "Bringing your realm online"
|
show_step 4 6 "Bringing your realm online"
|
||||||
info "Pulling images and waiting for containers to become healthy; this may take a few minutes on first deploy."
|
info "Pulling images and waiting for containers to become healthy; this may take a few minutes on first deploy."
|
||||||
stage_runtime
|
stage_runtime
|
||||||
|
|
||||||
show_step 5 7 "Applying server configuration"
|
show_step 5 6 "Applying server configuration"
|
||||||
apply_server_config
|
apply_server_config
|
||||||
|
|
||||||
show_step 6 7 "Updating realmlist"
|
show_step 6 6 "Finalizing deployment"
|
||||||
update_realmlist
|
|
||||||
|
|
||||||
show_step 7 7 "Finalizing deployment"
|
|
||||||
mark_deployment_complete
|
mark_deployment_complete
|
||||||
|
|
||||||
show_realm_ready
|
show_realm_ready
|
||||||
|
|||||||
19
docs/CICD.md
19
docs/CICD.md
@@ -58,21 +58,16 @@ The workflow **automatically fetches all module repositories** during the build.
|
|||||||
The workflow publishes images with **profile-specific tags** so you know exactly which modules are included:
|
The workflow publishes images with **profile-specific tags** so you know exactly which modules are included:
|
||||||
|
|
||||||
**Profile-Tagged Images** (recommended):
|
**Profile-Tagged Images** (recommended):
|
||||||
- `<dockerhub-username>/azerothcore-realmmaster:authserver-realmmaster-latest` ✅ Built nightly
|
- `<dockerhub-username>/azerothcore-realmmaster:authserver-realmmaster-latest`
|
||||||
- `<dockerhub-username>/azerothcore-realmmaster:authserver-realmmaster-YYYYMMDD` ✅ Built nightly
|
- `<dockerhub-username>/azerothcore-realmmaster:authserver-realmmaster-YYYYMMDD`
|
||||||
- `<dockerhub-username>/azerothcore-realmmaster:worldserver-realmmaster-latest` ✅ Built nightly
|
- `<dockerhub-username>/azerothcore-realmmaster:worldserver-realmmaster-latest`
|
||||||
- `<dockerhub-username>/azerothcore-realmmaster:worldserver-realmmaster-YYYYMMDD` ✅ Built nightly
|
- `<dockerhub-username>/azerothcore-realmmaster:worldserver-realmmaster-YYYYMMDD`
|
||||||
|
|
||||||
**Generic Tags** (backward compatibility, defaults to RealmMaster profile):
|
**Generic Tags** (backward compatibility, defaults to RealmMaster profile):
|
||||||
- `<dockerhub-username>/azerothcore-realmmaster:authserver-latest` ✅ Built nightly
|
- `<dockerhub-username>/azerothcore-realmmaster:authserver-latest`
|
||||||
- `<dockerhub-username>/azerothcore-realmmaster:worldserver-latest` ✅ Built nightly
|
- `<dockerhub-username>/azerothcore-realmmaster:worldserver-latest`
|
||||||
|
|
||||||
**Other Profile Tags** (built on-demand via manual workflow trigger):
|
The profile name in the tag tells you which module set is included (e.g., `realmmaster`, `suggested-modules`, `all-modules`).
|
||||||
- `authserver-suggested-modules-latest` - Available when built
|
|
||||||
- `authserver-all-modules-latest` - Available when built
|
|
||||||
- `authserver-playerbots-only-latest` - Available when built
|
|
||||||
|
|
||||||
**Note**: Only the RealmMaster profile is built automatically on schedule. Other profiles can be built by manually triggering the workflow with different profile names.
|
|
||||||
|
|
||||||
## Required GitHub Secrets
|
## Required GitHub Secrets
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,11 @@ cp .env.prebuilt .env
|
|||||||
Edit `.env` and set your Docker Hub username:
|
Edit `.env` and set your Docker Hub username:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Change this line to your Docker Hub username:
|
# Change this line:
|
||||||
DOCKERHUB_USERNAME=your-dockerhub-username
|
DOCKERHUB_USERNAME=your-dockerhub-username
|
||||||
|
|
||||||
|
# To (example):
|
||||||
|
DOCKERHUB_USERNAME=uprightbass360
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Optional: Customize Settings
|
### 4. Optional: Customize Settings
|
||||||
@@ -88,12 +91,10 @@ Each module profile gets its own tag:
|
|||||||
- **`:authserver-realmmaster-YYYYMMDD`** - Date-tagged RealmMaster builds
|
- **`:authserver-realmmaster-YYYYMMDD`** - Date-tagged RealmMaster builds
|
||||||
- **`:worldserver-realmmaster-YYYYMMDD`** - Date-tagged RealmMaster builds
|
- **`:worldserver-realmmaster-YYYYMMDD`** - Date-tagged RealmMaster builds
|
||||||
|
|
||||||
Other profiles (available when built via GitHub Actions):
|
Other available profiles (if built):
|
||||||
- **`:authserver-suggested-modules-latest`** - Suggested modules profile (not yet published)
|
- **`:authserver-suggested-modules-latest`** - Suggested modules profile
|
||||||
- **`:authserver-all-modules-latest`** - All modules profile (not yet published)
|
- **`:authserver-all-modules-latest`** - All modules profile
|
||||||
- **`:authserver-playerbots-only-latest`** - Playerbots only (not yet published)
|
- **`:authserver-playerbots-only-latest`** - Playerbots only
|
||||||
|
|
||||||
**Note**: Currently only the RealmMaster profile is built nightly. Other profiles can be built on-demand by manually triggering the CI/CD workflow.
|
|
||||||
|
|
||||||
### Generic Tags (Backward Compatibility)
|
### Generic Tags (Backward Compatibility)
|
||||||
|
|
||||||
|
|||||||
213
docs/RELEASES.md
213
docs/RELEASES.md
@@ -1,213 +0,0 @@
|
|||||||
# Release Strategy
|
|
||||||
|
|
||||||
This document explains how AzerothCore RealmMaster releases work and what they contain.
|
|
||||||
|
|
||||||
## Release Philosophy
|
|
||||||
|
|
||||||
Since **Docker images are stored on Docker Hub**, GitHub releases serve as **deployment packages** rather than source distributions. Each release contains everything users need to deploy pre-built images without building from source.
|
|
||||||
|
|
||||||
## What's in a Release?
|
|
||||||
|
|
||||||
### Release Assets (ZIP Archive)
|
|
||||||
|
|
||||||
Each release includes a downloadable `.zip` file containing:
|
|
||||||
|
|
||||||
```
|
|
||||||
azerothcore-realmmaster-v1.0.0-realmmaster.zip
|
|
||||||
├── .env.prebuilt # Pre-configured for Docker Hub images
|
|
||||||
├── docker-compose.yml # Service definitions
|
|
||||||
├── deploy.sh # Deployment script
|
|
||||||
├── status.sh # Status monitoring
|
|
||||||
├── cleanup.sh # Cleanup utilities
|
|
||||||
├── scripts/ # Required Python/Bash scripts
|
|
||||||
├── config/ # Module manifest and presets
|
|
||||||
├── docs/ # Complete documentation
|
|
||||||
├── QUICKSTART.md # Release-specific quick start
|
|
||||||
└── README.md # Project overview
|
|
||||||
```
|
|
||||||
|
|
||||||
### Release Notes
|
|
||||||
|
|
||||||
Each release includes:
|
|
||||||
- Module profile and count
|
|
||||||
- Docker Hub image tags (date-specific and latest)
|
|
||||||
- Quick start instructions
|
|
||||||
- Complete module list
|
|
||||||
- Build information (commit, date, source variant)
|
|
||||||
- Links to documentation
|
|
||||||
- Known issues
|
|
||||||
|
|
||||||
## Release Types
|
|
||||||
|
|
||||||
### 1. Profile-Based Releases
|
|
||||||
|
|
||||||
Each module profile gets its own release variant:
|
|
||||||
|
|
||||||
- **v1.0.0-realmmaster** - RealmMaster profile (32 modules, recommended)
|
|
||||||
- **v1.0.0-suggested-modules** - Alternative suggested module set
|
|
||||||
- **v1.0.0-all-modules** - All supported modules
|
|
||||||
- **v1.0.0-playerbots-only** - Just playerbots
|
|
||||||
|
|
||||||
Users choose the release that matches their desired module set.
|
|
||||||
|
|
||||||
### 2. Version Numbering
|
|
||||||
|
|
||||||
We use semantic versioning:
|
|
||||||
- **Major** (v1.0.0 → v2.0.0): Breaking changes, major feature additions
|
|
||||||
- **Minor** (v1.0.0 → v1.1.0): New modules, feature enhancements
|
|
||||||
- **Patch** (v1.0.0 → v1.0.1): Bug fixes, documentation updates
|
|
||||||
|
|
||||||
## Docker Hub Image Tags
|
|
||||||
|
|
||||||
Releases reference specific Docker Hub tags:
|
|
||||||
|
|
||||||
### Date-Tagged Images (Recommended for Production)
|
|
||||||
```
|
|
||||||
uprightbass360/azerothcore-realmmaster:authserver-realmmaster-20260109
|
|
||||||
uprightbass360/azerothcore-realmmaster:worldserver-realmmaster-20260109
|
|
||||||
```
|
|
||||||
- **Immutable**: Never change
|
|
||||||
- **Stable**: Guaranteed to match the release
|
|
||||||
- **Recommended**: For production deployments
|
|
||||||
|
|
||||||
### Latest Tags (Auto-Updated)
|
|
||||||
```
|
|
||||||
uprightbass360/azerothcore-realmmaster:authserver-realmmaster-latest
|
|
||||||
uprightbass360/azerothcore-realmmaster:worldserver-realmmaster-latest
|
|
||||||
```
|
|
||||||
- **Mutable**: Updated nightly by CI/CD
|
|
||||||
- **Convenient**: Always get the newest build
|
|
||||||
- **Use case**: Development, testing, staying current
|
|
||||||
|
|
||||||
## Creating a Release
|
|
||||||
|
|
||||||
### Automated (Recommended)
|
|
||||||
|
|
||||||
Use the GitHub Actions workflow:
|
|
||||||
|
|
||||||
1. Go to **Actions** → **Create Release**
|
|
||||||
2. Click **Run workflow**
|
|
||||||
3. Fill in:
|
|
||||||
- **Version**: `v1.0.0`
|
|
||||||
- **Profile**: `RealmMaster` (or other profile)
|
|
||||||
- **Pre-release**: Check if beta/RC
|
|
||||||
4. Click **Run workflow**
|
|
||||||
|
|
||||||
The workflow automatically:
|
|
||||||
- Creates deployment package with all files
|
|
||||||
- Generates release notes with module list
|
|
||||||
- Uploads ZIP archive as release asset
|
|
||||||
- Creates GitHub release with proper tags
|
|
||||||
|
|
||||||
### Manual
|
|
||||||
|
|
||||||
If you need to create a release manually:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. Tag the release
|
|
||||||
git tag -a v1.0.0 -m "Release v1.0.0 - RealmMaster Profile"
|
|
||||||
git push origin v1.0.0
|
|
||||||
|
|
||||||
# 2. Create deployment package
|
|
||||||
./scripts/create-release-package.sh v1.0.0 RealmMaster
|
|
||||||
|
|
||||||
# 3. Create GitHub release
|
|
||||||
# Go to GitHub → Releases → Draft a new release
|
|
||||||
# - Tag: v1.0.0
|
|
||||||
# - Title: RealmMaster v1.0.0 - RealmMaster Profile
|
|
||||||
# - Upload: azerothcore-realmmaster-v1.0.0-realmmaster.zip
|
|
||||||
# - Add release notes
|
|
||||||
```
|
|
||||||
|
|
||||||
## Release Checklist
|
|
||||||
|
|
||||||
Before creating a release:
|
|
||||||
|
|
||||||
- [ ] Verify CI/CD build succeeded
|
|
||||||
- [ ] Test Docker Hub images work correctly
|
|
||||||
- [ ] Update CHANGELOG.md
|
|
||||||
- [ ] Update version in documentation if needed
|
|
||||||
- [ ] Verify all module SQL migrations are included
|
|
||||||
- [ ] Test deployment on clean system
|
|
||||||
- [ ] Update known issues section
|
|
||||||
|
|
||||||
## For Users: Using a Release
|
|
||||||
|
|
||||||
### Quick Start
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. Download release
|
|
||||||
wget https://github.com/uprightbass360/AzerothCore-RealmMaster/releases/download/v1.0.0/azerothcore-realmmaster-v1.0.0-realmmaster.zip
|
|
||||||
|
|
||||||
# 2. Extract
|
|
||||||
unzip azerothcore-realmmaster-v1.0.0-realmmaster.zip
|
|
||||||
cd azerothcore-realmmaster-v1.0.0-realmmaster
|
|
||||||
|
|
||||||
# 3. Configure
|
|
||||||
nano .env.prebuilt
|
|
||||||
# Set: DOCKERHUB_USERNAME=your-dockerhub-username
|
|
||||||
|
|
||||||
# 4. Deploy
|
|
||||||
mv .env.prebuilt .env
|
|
||||||
./deploy.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
### Upgrading Between Releases
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. Backup your data
|
|
||||||
./scripts/bash/backup.sh
|
|
||||||
|
|
||||||
# 2. Download new release
|
|
||||||
wget https://github.com/.../releases/download/v1.1.0/...
|
|
||||||
|
|
||||||
# 3. Extract to new directory
|
|
||||||
unzip azerothcore-realmmaster-v1.1.0-realmmaster.zip
|
|
||||||
|
|
||||||
# 4. Copy your .env and data
|
|
||||||
cp old-version/.env new-version/.env
|
|
||||||
cp -r old-version/storage new-version/storage
|
|
||||||
|
|
||||||
# 5. Deploy new version
|
|
||||||
cd new-version
|
|
||||||
./deploy.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## Release Schedule
|
|
||||||
|
|
||||||
- **Nightly Builds**: Images built automatically at 2 AM UTC
|
|
||||||
- **Releases**: Created as needed when significant changes accumulate
|
|
||||||
- **LTS Releases**: Planned quarterly for long-term support
|
|
||||||
|
|
||||||
## Support
|
|
||||||
|
|
||||||
- **Release Issues**: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues
|
|
||||||
- **Documentation**: Included in each release ZIP
|
|
||||||
- **Discord**: https://discord.gg/gkt4y2x
|
|
||||||
|
|
||||||
## FAQ
|
|
||||||
|
|
||||||
### Why are images on Docker Hub and not in releases?
|
|
||||||
|
|
||||||
Docker images can be 1-2GB each. GitHub has a 2GB file limit and releases should be lightweight. Docker Hub is designed for hosting images, GitHub releases are for deployment packages.
|
|
||||||
|
|
||||||
### Can I use latest tags in production?
|
|
||||||
|
|
||||||
We recommend **date-tagged images** for production (e.g., `authserver-realmmaster-20260109`). Latest tags are updated nightly and may have untested changes.
|
|
||||||
|
|
||||||
### How do I know which image version a release uses?
|
|
||||||
|
|
||||||
Check the release notes - they include the specific Docker Hub tags (date-stamped) that were tested with that release.
|
|
||||||
|
|
||||||
### What if I want to build from source instead?
|
|
||||||
|
|
||||||
Clone the repository and use `./setup.sh` + `./build.sh` instead of using pre-built releases. See [GETTING_STARTED.md](GETTING_STARTED.md) for instructions.
|
|
||||||
|
|
||||||
### Are releases required?
|
|
||||||
|
|
||||||
No! You can:
|
|
||||||
1. **Use releases**: Download ZIP, deploy pre-built images (easiest)
|
|
||||||
2. **Use nightly images**: Pull latest tags directly from Docker Hub
|
|
||||||
3. **Build from source**: Clone repo, build locally (most flexible)
|
|
||||||
|
|
||||||
Releases are just convenient snapshots for users who want stability.
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Updates the realmlist table in the database with current SERVER_ADDRESS and REALM_PORT from .env
|
|
||||||
set -e
|
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
||||||
|
|
||||||
# Source colors and functions
|
|
||||||
BLUE='\033[0;34m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
YELLOW='\033[1;33m'
|
|
||||||
RED='\033[0;31m'
|
|
||||||
NC='\033[0m'
|
|
||||||
|
|
||||||
info() { printf '%b\n' "${BLUE}ℹ️ $*${NC}"; }
|
|
||||||
ok() { printf '%b\n' "${GREEN}✅ $*${NC}"; }
|
|
||||||
warn() { printf '%b\n' "${YELLOW}⚠️ $*${NC}"; }
|
|
||||||
err() { printf '%b\n' "${RED}❌ $*${NC}"; }
|
|
||||||
|
|
||||||
# Load environment variables from .env
|
|
||||||
if [ -f "$ROOT_DIR/.env" ]; then
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
set -a
|
|
||||||
source "$ROOT_DIR/.env"
|
|
||||||
set +a
|
|
||||||
else
|
|
||||||
err "No .env file found at $ROOT_DIR/.env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check required variables
|
|
||||||
if [ -z "$SERVER_ADDRESS" ]; then
|
|
||||||
err "SERVER_ADDRESS not set in .env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$REALM_PORT" ]; then
|
|
||||||
err "REALM_PORT not set in .env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$MYSQL_HOST" ]; then
|
|
||||||
err "MYSQL_HOST not set in .env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$MYSQL_USER" ]; then
|
|
||||||
err "MYSQL_USER not set in .env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$MYSQL_ROOT_PASSWORD" ]; then
|
|
||||||
err "MYSQL_ROOT_PASSWORD not set in .env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DB_AUTH_NAME" ]; then
|
|
||||||
err "DB_AUTH_NAME not set in .env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Updating realmlist table..."
|
|
||||||
info " Address: $SERVER_ADDRESS"
|
|
||||||
info " Port: $REALM_PORT"
|
|
||||||
|
|
||||||
# Try to update the database
|
|
||||||
if mysql -h "${MYSQL_HOST}" -u"${MYSQL_USER}" -p"${MYSQL_ROOT_PASSWORD}" --skip-ssl-verify "${DB_AUTH_NAME}" \
|
|
||||||
-e "UPDATE realmlist SET address='${SERVER_ADDRESS}', port=${REALM_PORT} WHERE id=1;" 2>/dev/null; then
|
|
||||||
ok "Realmlist updated successfully"
|
|
||||||
|
|
||||||
# Show the current realmlist entry
|
|
||||||
mysql -h "${MYSQL_HOST}" -u"${MYSQL_USER}" -p"${MYSQL_ROOT_PASSWORD}" --skip-ssl-verify "${DB_AUTH_NAME}" \
|
|
||||||
-e "SELECT id, name, address, port FROM realmlist WHERE id=1;" 2>/dev/null || true
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
warn "Could not update realmlist table"
|
|
||||||
warn "This is normal if the database is not yet initialized or MySQL is not running"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user