Improve client data container: add 7z, root access, and ownership fix

- Run container as root during extraction to avoid permission issues
- Install p7zip-full for faster 7z extraction vs unzip
- Fix file ownership after extraction using chown
- Remove problematic retry logic that was causing corruption issues
- Keep reliable original script with version detection and caching
This commit is contained in:
uprightbass360
2025-11-08 14:39:39 -05:00
parent f65bdeb791
commit 7813414f2c

View File

@@ -283,7 +283,7 @@ services:
profiles: ["client-data-bots"]
image: ${AC_CLIENT_DATA_IMAGE_PLAYERBOTS}
container_name: ac-client-data
user: "${CONTAINER_USER}"
user: "0:0"
depends_on:
ac-volume-init:
condition: service_completed_successfully
@@ -299,10 +299,15 @@ services:
- sh
- -c
- |
echo "📦 Installing 7z for faster extraction..."
apt-get update -qq && apt-get install -y p7zip-full
mkdir -p /cache
if [ -f /tmp/scripts/download-client-data.sh ]; then
chmod +x /tmp/scripts/download-client-data.sh 2>/dev/null || true
bash /tmp/scripts/download-client-data.sh
echo "🔧 Fixing ownership of extracted files..."
chown -R ${CONTAINER_USER} /azerothcore/data
echo "✅ Client data extraction and ownership setup complete"
else
echo "No local client-data script"
fi