Fix ac-client-data command syntax for Portainer compatibility

This commit is contained in:
Deckard
2025-09-27 03:22:50 -04:00
parent a0cc5cc79a
commit 6d15bcef6f

View File

@@ -143,8 +143,10 @@ 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
- -c
- |
apk add --no-cache curl unzip wget ca-certificates p7zip 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
@@ -159,18 +161,18 @@ services:
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 exit 1
} }
@@ -194,15 +196,14 @@ services:
# Verify required directories exist # Verify required directories exist
for dir in maps vmaps mmaps dbc; do for dir in maps vmaps mmaps dbc; do
if [ -d \"/azerothcore/data/$$dir\" ]; then if [ -d "/azerothcore/data/$$dir" ]; then
echo \"✅ $$dir directory: OK\" echo "✅ $$dir directory: OK"
else else
echo \"❌ $$dir directory: MISSING\" echo "❌ $$dir directory: MISSING"
fi fi
done done
echo '🎉 Game data setup complete! AzerothCore worldserver can now start.' echo '🎉 Game data setup complete! AzerothCore worldserver can now start.'
"
restart: "no" restart: "no"
networks: networks:
- azerothcore - azerothcore