Fix container permissions and update timezone default

Container fixes:
- Remove complex su user switching that fails due to missing user
- Run scripts as root but ensure file ownership matches NFS mapping
- Simplifies deployment and allows package installation to succeed

Setup script:
- Change default timezone from UTC to America/New_York
This commit is contained in:
Deckard
2025-10-13 01:07:25 -04:00
parent c90d777f2c
commit 9fe4a2b00a
2 changed files with 4 additions and 7 deletions

View File

@@ -39,13 +39,11 @@ services:
mkdir -p /cache
chown ${CONTAINER_USER} /cache /azerothcore/data 2>/dev/null || true
# Download and execute client data script from GitHub as mapped user
# Download and execute client data script from GitHub
echo "📥 Downloading client data script from GitHub..."
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/download-client-data.sh -o /tmp/download-client-data.sh
chmod +x /tmp/download-client-data.sh
# Switch to mapped user for file operations
su -s /bin/sh $${CONTAINER_USER%%:*} -c '/tmp/download-client-data.sh' || /tmp/download-client-data.sh
/tmp/download-client-data.sh
restart: "no"
networks:
- azerothcore
@@ -212,8 +210,7 @@ services:
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/manage-modules-sql.sh -o /scripts/manage-modules-sql.sh
chmod +x /tmp/manage-modules.sh /scripts/manage-modules-sql.sh
# Run module management as mapped user
su -s /bin/sh $${CONTAINER_USER%%:*} -c '/tmp/manage-modules.sh' || /tmp/manage-modules.sh
/tmp/manage-modules.sh
restart: "no"
networks:
- azerothcore

View File

@@ -322,7 +322,7 @@ main() {
BACKUP_DAILY_TIME=$(prompt_input "Daily backup time (24h format, e.g., 09 for 9 AM)" "09" "")
# Optional: Timezone
TIMEZONE=$(prompt_input "Server timezone" "UTC" "")
TIMEZONE=$(prompt_input "Server timezone" "America/New_York" "")
# Module Configuration
print_status "HEADER" "MODULE CONFIGURATION"