mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-03-03 07:17:46 +00:00
Compare commits
6 Commits
0.0.1
...
6a05fe785f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a05fe785f | ||
|
|
c46f25a1a9 | ||
|
|
517adc4225 | ||
|
|
f4e88abde8 | ||
|
|
305da352c0 | ||
|
|
61436263ad |
@@ -559,3 +559,6 @@ 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
|
||||||
|
|||||||
2
.github/workflows/build-and-publish.yml
vendored
2
.github/workflows/build-and-publish.yml
vendored
@@ -230,7 +230,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//' || true >> $GITHUB_STEP_SUMMARY
|
grep '^MODULE_.*=1' .env | sed 's/=1//' >> $GITHUB_STEP_SUMMARY || true
|
||||||
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
|
||||||
|
|||||||
238
.github/workflows/create-release.yml
vendored
238
.github/workflows/create-release.yml
vendored
@@ -87,54 +87,54 @@ jobs:
|
|||||||
cp -r docs "${PACKAGE_NAME}/docs"
|
cp -r docs "${PACKAGE_NAME}/docs"
|
||||||
|
|
||||||
# Create a quick start guide specific to this release
|
# Create a quick start guide specific to this release
|
||||||
cat > "${PACKAGE_NAME}/QUICKSTART.md" <<EOF
|
{
|
||||||
# Quick Start - AzerothCore RealmMaster ${VERSION}
|
echo "# Quick Start - AzerothCore RealmMaster ${VERSION}"
|
||||||
|
echo ""
|
||||||
## Module Profile: ${PROFILE}
|
echo "## Module Profile: ${PROFILE}"
|
||||||
**${MODULE_COUNT} modules included**
|
echo "${MODULE_COUNT} modules included"
|
||||||
|
echo ""
|
||||||
## Docker Images
|
echo "## Docker Images"
|
||||||
This release uses the following pre-built images:
|
echo "This release uses the following pre-built images:"
|
||||||
- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-${BUILD_DATE}\`
|
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-${BUILD_DATE}\`"
|
||||||
- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-${BUILD_DATE}\`
|
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-${BUILD_DATE}\`"
|
||||||
|
echo ""
|
||||||
Or use the latest tags:
|
echo "Or use the latest tags:"
|
||||||
- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-latest\`
|
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-latest\`"
|
||||||
- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-latest\`
|
echo "- \`\${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-latest\`"
|
||||||
|
echo ""
|
||||||
## Installation
|
echo "## Installation"
|
||||||
|
echo ""
|
||||||
1. **Edit .env.prebuilt**:
|
echo "1. **Edit .env.prebuilt**:"
|
||||||
\`\`\`bash
|
echo " \`\`\`bash"
|
||||||
nano .env.prebuilt
|
echo " nano .env.prebuilt"
|
||||||
# Set: DOCKERHUB_USERNAME=uprightbass360
|
echo " # Set: DOCKERHUB_USERNAME=your-dockerhub-username"
|
||||||
\`\`\`
|
echo " \`\`\`"
|
||||||
|
echo ""
|
||||||
2. **Rename to .env**:
|
echo "2. **Rename to .env**:"
|
||||||
\`\`\`bash
|
echo " \`\`\`bash"
|
||||||
mv .env.prebuilt .env
|
echo " mv .env.prebuilt .env"
|
||||||
\`\`\`
|
echo " \`\`\`"
|
||||||
|
echo ""
|
||||||
3. **Deploy**:
|
echo "3. **Deploy**:"
|
||||||
\`\`\`bash
|
echo " \`\`\`bash"
|
||||||
chmod +x deploy.sh status.sh cleanup.sh
|
echo " chmod +x deploy.sh status.sh cleanup.sh"
|
||||||
./deploy.sh
|
echo " ./deploy.sh"
|
||||||
\`\`\`
|
echo " \`\`\`"
|
||||||
|
echo ""
|
||||||
4. **Check status**:
|
echo "4. **Check status**:"
|
||||||
\`\`\`bash
|
echo " \`\`\`bash"
|
||||||
./status.sh
|
echo " ./status.sh"
|
||||||
\`\`\`
|
echo " \`\`\`"
|
||||||
|
echo ""
|
||||||
## Documentation
|
echo "## Documentation"
|
||||||
- [Pre-Built Images Guide](docs/PREBUILT_IMAGES.md)
|
echo "- [Pre-Built Images Guide](docs/PREBUILT_IMAGES.md)"
|
||||||
- [Getting Started](docs/GETTING_STARTED.md)
|
echo "- [Getting Started](docs/GETTING_STARTED.md)"
|
||||||
- [Troubleshooting](docs/TROUBLESHOOTING.md)
|
echo "- [Troubleshooting](docs/TROUBLESHOOTING.md)"
|
||||||
|
echo ""
|
||||||
## Support
|
echo "## Support"
|
||||||
- GitHub Issues: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues
|
echo "- GitHub Issues: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues"
|
||||||
- AzerothCore Discord: https://discord.gg/gkt4y2x
|
echo "- AzerothCore Discord: https://discord.gg/gkt4y2x"
|
||||||
EOF
|
} > "${PACKAGE_NAME}/QUICKSTART.md"
|
||||||
|
|
||||||
# Make scripts executable
|
# Make scripts executable
|
||||||
chmod +x "${PACKAGE_NAME}/deploy.sh"
|
chmod +x "${PACKAGE_NAME}/deploy.sh"
|
||||||
@@ -148,77 +148,77 @@ EOF
|
|||||||
|
|
||||||
- name: Generate release notes
|
- name: Generate release notes
|
||||||
run: |
|
run: |
|
||||||
cat > release_notes.md <<EOF
|
{
|
||||||
# AzerothCore RealmMaster ${VERSION} - ${PROFILE} Profile
|
echo "# AzerothCore RealmMaster ${VERSION} - ${PROFILE} Profile"
|
||||||
|
echo ""
|
||||||
## 🎯 Module Profile: ${PROFILE}
|
echo "## 🎯 Module Profile: ${PROFILE}"
|
||||||
**${MODULE_COUNT} modules included**
|
echo "${MODULE_COUNT} modules included"
|
||||||
|
echo ""
|
||||||
## 📦 Docker Images
|
echo "## 📦 Docker Images"
|
||||||
|
echo ""
|
||||||
Pull these pre-built images from Docker Hub:
|
echo "Pull these pre-built images from Docker Hub:"
|
||||||
|
echo ""
|
||||||
**Date-specific (recommended for production)**:
|
echo "**Date-specific (recommended for production)**:"
|
||||||
\`\`\`bash
|
echo "\`\`\`bash"
|
||||||
docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-${BUILD_DATE}
|
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-${BUILD_DATE}"
|
||||||
docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-${BUILD_DATE}
|
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-${BUILD_DATE}"
|
||||||
\`\`\`
|
echo "\`\`\`"
|
||||||
|
echo ""
|
||||||
**Latest (auto-updated nightly)**:
|
echo "**Latest (auto-updated nightly)**:"
|
||||||
\`\`\`bash
|
echo "\`\`\`bash"
|
||||||
docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-latest
|
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:authserver-${PROFILE_TAG}-latest"
|
||||||
docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-latest
|
echo "docker pull \${DOCKERHUB_USERNAME}/azerothcore-realmmaster:worldserver-${PROFILE_TAG}-latest"
|
||||||
\`\`\`
|
echo "\`\`\`"
|
||||||
|
echo ""
|
||||||
## 🚀 Quick Start
|
echo "## 🚀 Quick Start"
|
||||||
|
echo ""
|
||||||
\`\`\`bash
|
echo "\`\`\`bash"
|
||||||
# Download and extract
|
echo "# Download and extract"
|
||||||
wget https://github.com/uprightbass360/AzerothCore-RealmMaster/releases/download/${VERSION}/${PACKAGE_NAME}.zip
|
echo "wget https://github.com/uprightbass360/AzerothCore-RealmMaster/releases/download/${VERSION}/${PACKAGE_NAME}.zip"
|
||||||
unzip ${PACKAGE_NAME}.zip
|
echo "unzip ${PACKAGE_NAME}.zip"
|
||||||
cd ${PACKAGE_NAME}
|
echo "cd ${PACKAGE_NAME}"
|
||||||
|
echo ""
|
||||||
# Configure Docker Hub username
|
echo "# Configure Docker Hub username"
|
||||||
nano .env.prebuilt
|
echo "nano .env.prebuilt"
|
||||||
# Set: DOCKERHUB_USERNAME=uprightbass360
|
echo "# Set: DOCKERHUB_USERNAME=your-dockerhub-username"
|
||||||
|
echo ""
|
||||||
# Deploy
|
echo "# Deploy"
|
||||||
mv .env.prebuilt .env
|
echo "mv .env.prebuilt .env"
|
||||||
./deploy.sh
|
echo "./deploy.sh"
|
||||||
\`\`\`
|
echo "\`\`\`"
|
||||||
|
echo ""
|
||||||
Full documentation in \`docs/PREBUILT_IMAGES.md\`
|
echo "Full documentation in \`docs/PREBUILT_IMAGES.md\`"
|
||||||
|
echo ""
|
||||||
## 📋 Included Modules
|
echo "## 📋 Included Modules"
|
||||||
|
echo ""
|
||||||
$(cat modules.txt)
|
cat modules.txt
|
||||||
|
echo ""
|
||||||
## 📊 Build Information
|
echo "## 📊 Build Information"
|
||||||
|
echo ""
|
||||||
- **Built**: ${BUILD_DATE}
|
echo "- **Built**: ${BUILD_DATE}"
|
||||||
- **AzerothCore Commit**: ${ACORE_COMMIT}
|
echo "- **AzerothCore Commit**: ${ACORE_COMMIT}"
|
||||||
- **Source Variant**: playerbots (for MODULE_PLAYERBOTS support)
|
echo "- **Source Variant**: playerbots (for MODULE_PLAYERBOTS support)"
|
||||||
- **Profile**: ${PROFILE}
|
echo "- **Profile**: ${PROFILE}"
|
||||||
- **Module Count**: ${MODULE_COUNT}
|
echo "- **Module Count**: ${MODULE_COUNT}"
|
||||||
|
echo ""
|
||||||
## 📖 Documentation
|
echo "## 📖 Documentation"
|
||||||
|
echo ""
|
||||||
Full documentation available in the \`docs/\` directory of the release package:
|
echo "Full documentation available in the \`docs/\` directory of the release package:"
|
||||||
- [Pre-Built Images Guide](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/PREBUILT_IMAGES.md)
|
echo "- [Pre-Built Images Guide](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/PREBUILT_IMAGES.md)"
|
||||||
- [Getting Started Guide](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/GETTING_STARTED.md)
|
echo "- [Getting Started Guide](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/GETTING_STARTED.md)"
|
||||||
- [Module Catalog](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/MODULES.md)
|
echo "- [Module Catalog](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/MODULES.md)"
|
||||||
- [Troubleshooting](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/TROUBLESHOOTING.md)
|
echo "- [Troubleshooting](https://github.com/uprightbass360/AzerothCore-RealmMaster/blob/${VERSION}/docs/TROUBLESHOOTING.md)"
|
||||||
|
echo ""
|
||||||
## 🐛 Known Issues
|
echo "## 🐛 Known Issues"
|
||||||
|
echo ""
|
||||||
None at this time. Report issues at: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues
|
echo "None at this time. Report issues at: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues"
|
||||||
|
echo ""
|
||||||
## 💬 Support
|
echo "## 💬 Support"
|
||||||
|
echo ""
|
||||||
- **GitHub Issues**: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues
|
echo "- **GitHub Issues**: https://github.com/uprightbass360/AzerothCore-RealmMaster/issues"
|
||||||
- **AzerothCore Discord**: https://discord.gg/gkt4y2x
|
echo "- **AzerothCore Discord**: https://discord.gg/gkt4y2x"
|
||||||
- **Documentation**: https://github.com/uprightbass360/AzerothCore-RealmMaster/tree/${VERSION}/docs
|
echo "- **Documentation**: https://github.com/uprightbass360/AzerothCore-RealmMaster/tree/${VERSION}/docs"
|
||||||
EOF
|
} > release_notes.md
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|||||||
@@ -5517,6 +5517,48 @@
|
|||||||
"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,6 +891,24 @@ 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
|
||||||
@@ -947,29 +965,32 @@ main(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show_step 1 4 "Checking build requirements"
|
show_step 1 7 "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 4 "Stopping runtime stack"
|
show_step 2 7 "Stopping runtime stack"
|
||||||
stop_runtime_stack
|
stop_runtime_stack
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show_step 3 5 "Importing user database files"
|
show_step 3 7 "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 6 "Bringing your realm online"
|
show_step 4 7 "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 6 "Applying server configuration"
|
show_step 5 7 "Applying server configuration"
|
||||||
apply_server_config
|
apply_server_config
|
||||||
|
|
||||||
show_step 6 6 "Finalizing deployment"
|
show_step 6 7 "Updating realmlist"
|
||||||
|
update_realmlist
|
||||||
|
|
||||||
|
show_step 7 7 "Finalizing deployment"
|
||||||
mark_deployment_complete
|
mark_deployment_complete
|
||||||
|
|
||||||
show_realm_ready
|
show_realm_ready
|
||||||
|
|||||||
@@ -48,11 +48,8 @@ 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:
|
# Change this line to your Docker Hub username:
|
||||||
DOCKERHUB_USERNAME=your-dockerhub-username
|
DOCKERHUB_USERNAME=your-dockerhub-username
|
||||||
|
|
||||||
# To (example):
|
|
||||||
DOCKERHUB_USERNAME=uprightbass360
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Optional: Customize Settings
|
### 4. Optional: Customize Settings
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ cd azerothcore-realmmaster-v1.0.0-realmmaster
|
|||||||
|
|
||||||
# 3. Configure
|
# 3. Configure
|
||||||
nano .env.prebuilt
|
nano .env.prebuilt
|
||||||
# Set: DOCKERHUB_USERNAME=uprightbass360
|
# Set: DOCKERHUB_USERNAME=your-dockerhub-username
|
||||||
|
|
||||||
# 4. Deploy
|
# 4. Deploy
|
||||||
mv .env.prebuilt .env
|
mv .env.prebuilt .env
|
||||||
|
|||||||
80
scripts/bash/update-realmlist.sh
Normal file
80
scripts/bash/update-realmlist.sh
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
#!/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