fix: updates clientdata job to use non-root

This commit is contained in:
uprightbass360
2025-10-29 12:20:47 -04:00
parent cf8229d1c6
commit 1fc7ee88a6
4 changed files with 121 additions and 140 deletions

View File

@@ -203,7 +203,7 @@ services:
profiles: ["client-data"]
image: ${AC_CLIENT_DATA_IMAGE}
container_name: ac-client-data
user: "0:0"
user: "${CONTAINER_USER}"
volumes:
- ac-client-data:/azerothcore/data
- ${CLIENT_DATA_CACHE_PATH}:/cache
@@ -216,14 +216,7 @@ services:
- sh
- -c
- |
if command -v apk >/dev/null 2>&1; then
apk add --no-cache curl unzip wget bash ca-certificates p7zip aria2 jq
elif command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y --no-install-recommends curl unzip wget bash ca-certificates p7zip-full aria2 jq && rm -rf /var/lib/apt/lists/*
elif command -v yum >/dev/null 2>&1; then
yum install -y curl unzip wget bash ca-certificates p7zip aria2 jq
fi
mkdir -p /cache && chown ${CONTAINER_USER} /cache /azerothcore/data 2>/dev/null || true
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
@@ -238,7 +231,7 @@ services:
profiles: ["client-data-bots"]
image: ${AC_CLIENT_DATA_IMAGE_PLAYERBOTS}
container_name: ac-client-data
user: "0:0"
user: "${CONTAINER_USER}"
volumes:
- ac-client-data:/azerothcore/data
- ${CLIENT_DATA_CACHE_PATH}:/cache
@@ -251,14 +244,7 @@ services:
- sh
- -c
- |
if command -v apk >/dev/null 2>&1; then
apk add --no-cache curl unzip wget bash ca-certificates p7zip aria2 jq
elif command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y --no-install-recommends curl unzip wget bash ca-certificates p7zip-full aria2 jq && rm -rf /var/lib/apt/lists/*
elif command -v yum >/dev/null 2>&1; then
yum install -y curl unzip wget bash ca-certificates p7zip aria2 jq
fi
mkdir -p /cache && chown ${CONTAINER_USER} /cache /azerothcore/data 2>/dev/null || true
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