mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
Fix ac-client-data command syntax for Portainer compatibility
This commit is contained in:
@@ -143,66 +143,67 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${HOST_DATA_PATH:-./data}:/azerothcore/data
|
- ${HOST_DATA_PATH:-./data}:/azerothcore/data
|
||||||
working_dir: /tmp
|
working_dir: /tmp
|
||||||
command: >
|
command:
|
||||||
sh -c "
|
- sh
|
||||||
apk add --no-cache curl unzip wget ca-certificates p7zip
|
- -c
|
||||||
|
- |
|
||||||
|
apk add --no-cache curl unzip wget ca-certificates p7zip
|
||||||
|
|
||||||
if [ -d '/azerothcore/data/maps' ] && [ -d '/azerothcore/data/vmaps' ] && [ -d '/azerothcore/data/mmaps' ] && [ -d '/azerothcore/data/dbc' ]; then
|
if [ -d '/azerothcore/data/maps' ] && [ -d '/azerothcore/data/vmaps' ] && [ -d '/azerothcore/data/mmaps' ] && [ -d '/azerothcore/data/dbc' ]; then
|
||||||
echo '✅ Game data already exists, skipping download'
|
echo '✅ Game data already exists, skipping download'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '🚀 Starting AzerothCore game data download...'
|
echo '🚀 Starting AzerothCore game data download...'
|
||||||
echo 'This will download ~15GB of data and may take 10-30 minutes'
|
echo 'This will download ~15GB of data and may take 10-30 minutes'
|
||||||
|
|
||||||
# Get the latest release info from wowgaming/client-data
|
# Get the latest release info from wowgaming/client-data
|
||||||
echo '📡 Fetching latest client data release info...'
|
echo '📡 Fetching latest client data release info...'
|
||||||
LATEST_URL=$$(wget -qO- https://api.github.com/repos/wowgaming/client-data/releases/latest | grep '"browser_download_url":' | grep '\.7z' | cut -d'"' -f4 | head -1)
|
LATEST_URL=$$(wget -qO- https://api.github.com/repos/wowgaming/client-data/releases/latest | grep '"browser_download_url":' | grep '\.7z' | cut -d'"' -f4 | head -1)
|
||||||
|
|
||||||
if [ -z \"$$LATEST_URL\" ]; then
|
if [ -z "$$LATEST_URL" ]; then
|
||||||
echo '❌ Could not fetch latest release URL'
|
echo '❌ Could not fetch latest release URL'
|
||||||
echo '📥 Using fallback: direct download from v16 release'
|
echo '📥 Using fallback: direct download from v16 release'
|
||||||
LATEST_URL='https://github.com/wowgaming/client-data/releases/download/v16/data.7z'
|
LATEST_URL='https://github.com/wowgaming/client-data/releases/download/v16/data.7z'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo \"📥 Downloading client data from: $$LATEST_URL\"
|
echo "📥 Downloading client data from: $$LATEST_URL"
|
||||||
|
|
||||||
# Download the client data
|
# Download the client data
|
||||||
wget -O data.7z \"$$LATEST_URL\" || {
|
wget -O data.7z "$$LATEST_URL" || {
|
||||||
echo '❌ Download failed, trying alternative method'
|
echo '❌ Download failed, trying alternative method'
|
||||||
curl -L -o data.7z \"$$LATEST_URL\" || {
|
curl -L -o data.7z "$$LATEST_URL" || {
|
||||||
echo '❌ All download methods failed'
|
echo '❌ All download methods failed'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '📊 Download completed, file size:'
|
||||||
|
ls -lh data.7z
|
||||||
|
|
||||||
|
echo '📂 Extracting client data (this may take 10-15 minutes)...'
|
||||||
|
7z x data.7z -o/azerothcore/data/ || {
|
||||||
|
echo '❌ Extraction failed'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
echo '📊 Download completed, file size:'
|
echo '🧹 Cleaning up downloaded archive...'
|
||||||
ls -lh data.7z
|
rm -f data.7z
|
||||||
|
|
||||||
echo '📂 Extracting client data (this may take 10-15 minutes)...'
|
echo '✅ Client data extraction complete!'
|
||||||
7z x data.7z -o/azerothcore/data/ || {
|
echo '📁 Verifying extracted directories:'
|
||||||
echo '❌ Extraction failed'
|
ls -la /azerothcore/data/
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '🧹 Cleaning up downloaded archive...'
|
# Verify required directories exist
|
||||||
rm -f data.7z
|
for dir in maps vmaps mmaps dbc; do
|
||||||
|
if [ -d "/azerothcore/data/$$dir" ]; then
|
||||||
|
echo "✅ $$dir directory: OK"
|
||||||
|
else
|
||||||
|
echo "❌ $$dir directory: MISSING"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo '✅ Client data extraction complete!'
|
echo '🎉 Game data setup complete! AzerothCore worldserver can now start.'
|
||||||
echo '📁 Verifying extracted directories:'
|
|
||||||
ls -la /azerothcore/data/
|
|
||||||
|
|
||||||
# Verify required directories exist
|
|
||||||
for dir in maps vmaps mmaps dbc; do
|
|
||||||
if [ -d \"/azerothcore/data/$$dir\" ]; then
|
|
||||||
echo \"✅ $$dir directory: OK\"
|
|
||||||
else
|
|
||||||
echo \"❌ $$dir directory: MISSING\"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo '🎉 Game data setup complete! AzerothCore worldserver can now start.'
|
|
||||||
"
|
|
||||||
restart: "no"
|
restart: "no"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
|
|||||||
Reference in New Issue
Block a user