mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 09:07:20 +00:00
user permission alignment
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# DEPLOYMENT CONFIGURATION
|
# DEPLOYMENT CONFIGURATION
|
||||||
# ==============================================
|
# ==============================================
|
||||||
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
||||||
STORAGE_ROOT=./storage
|
STORAGE_ROOT=/nfs/containers
|
||||||
# Storage configuration for database layer
|
# Storage configuration for database layer
|
||||||
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
||||||
|
|
||||||
@@ -14,6 +14,16 @@ STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
|||||||
# Timezone
|
# Timezone
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
|
|
||||||
|
# ==============================================
|
||||||
|
# USER MAPPING CONFIGURATION (for NFS compatibility)
|
||||||
|
# ==============================================
|
||||||
|
# User and group IDs for container processes
|
||||||
|
# Set these to match your NFS server's user mapping
|
||||||
|
# Default: 1001:1000 (matches 'sharing' user on most systems)
|
||||||
|
CONTAINER_USER_ID=1001
|
||||||
|
CONTAINER_GROUP_ID=1000
|
||||||
|
CONTAINER_USER=${CONTAINER_USER_ID}:${CONTAINER_GROUP_ID}
|
||||||
|
|
||||||
# ==============================================
|
# ==============================================
|
||||||
# DATABASE CREDENTIALS
|
# DATABASE CREDENTIALS
|
||||||
# ==============================================
|
# ==============================================
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ services:
|
|||||||
ac-db-import:
|
ac-db-import:
|
||||||
image: ${AC_DB_IMPORT_IMAGE}
|
image: ${AC_DB_IMPORT_IMAGE}
|
||||||
container_name: ${CONTAINER_DB_IMPORT}
|
container_name: ${CONTAINER_DB_IMPORT}
|
||||||
user: "${CONTAINER_USER}"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
ac-mysql:
|
ac-mysql:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -144,13 +143,17 @@ services:
|
|||||||
DB_AUTH_NAME: ${DB_AUTH_NAME}
|
DB_AUTH_NAME: ${DB_AUTH_NAME}
|
||||||
DB_WORLD_NAME: ${DB_WORLD_NAME}
|
DB_WORLD_NAME: ${DB_WORLD_NAME}
|
||||||
DB_CHARACTERS_NAME: ${DB_CHARACTERS_NAME}
|
DB_CHARACTERS_NAME: ${DB_CHARACTERS_NAME}
|
||||||
|
CONTAINER_USER: ${CONTAINER_USER}
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
# Install curl for downloading conditional db import script
|
# Install curl for downloading conditional db import script (as root)
|
||||||
microdnf install -y curl || yum install -y curl || (apt-get update && apt-get install -y curl)
|
microdnf install -y curl || yum install -y curl || (apt-get update && apt-get install -y curl)
|
||||||
|
|
||||||
|
# Set ownership for config directories
|
||||||
|
chown ${CONTAINER_USER} /azerothcore/env/dist/etc 2>/dev/null || true
|
||||||
|
|
||||||
# Download conditional db import script from GitHub
|
# Download conditional db import script from GitHub
|
||||||
echo "📥 Downloading conditional database import script from GitHub..."
|
echo "📥 Downloading conditional database import script from GitHub..."
|
||||||
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/db-import-conditional.sh -o /tmp/db-import-conditional.sh
|
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/db-import-conditional.sh -o /tmp/db-import-conditional.sh
|
||||||
|
|||||||
@@ -8,9 +8,19 @@
|
|||||||
# ==============================================
|
# ==============================================
|
||||||
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
||||||
# !!Set this for your environment root!!!
|
# !!Set this for your environment root!!!
|
||||||
STORAGE_ROOT=./storage
|
STORAGE_ROOT=/nfs/containers
|
||||||
# Storage configuration (must match database layer)
|
# Storage configuration (must match database layer)
|
||||||
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
||||||
|
|
||||||
|
# ==============================================
|
||||||
|
# USER MAPPING CONFIGURATION (for NFS compatibility)
|
||||||
|
# ==============================================
|
||||||
|
# User and group IDs for container processes
|
||||||
|
# Set these to match your NFS server's user mapping
|
||||||
|
# Default: 1001:1000 (matches 'sharing' user on most systems)
|
||||||
|
CONTAINER_USER_ID=1001
|
||||||
|
CONTAINER_GROUP_ID=1000
|
||||||
|
CONTAINER_USER=${CONTAINER_USER_ID}:${CONTAINER_GROUP_ID}
|
||||||
# GIT
|
# GIT
|
||||||
GIT_EMAIL=uprightbass360@gmail.com
|
GIT_EMAIL=uprightbass360@gmail.com
|
||||||
GIT_USERNAME=uprightbass360
|
GIT_USERNAME=uprightbass360
|
||||||
@@ -99,19 +109,19 @@ PLAYERBOT_MAX_BOTS=40
|
|||||||
# Module configuration
|
# Module configuration
|
||||||
MODULE_PLAYERBOTS=0
|
MODULE_PLAYERBOTS=0
|
||||||
MODULE_AOE_LOOT=0
|
MODULE_AOE_LOOT=0
|
||||||
MODULE_LEARN_SPELLS=0
|
MODULE_LEARN_SPELLS=1
|
||||||
MODULE_FIREWORKS=0
|
MODULE_FIREWORKS=1
|
||||||
MODULE_INDIVIDUAL_PROGRESSION=0
|
MODULE_INDIVIDUAL_PROGRESSION=0
|
||||||
|
|
||||||
# Quality of Life Modules
|
# Quality of Life Modules
|
||||||
MODULE_AHBOT=0
|
MODULE_AHBOT=1
|
||||||
MODULE_AUTOBALANCE=0
|
MODULE_AUTOBALANCE=1
|
||||||
MODULE_TRANSMOG=0
|
MODULE_TRANSMOG=1
|
||||||
MODULE_NPC_BUFFER=0
|
MODULE_NPC_BUFFER=1
|
||||||
|
|
||||||
# Gameplay Enhancement Modules
|
# Gameplay Enhancement Modules
|
||||||
MODULE_DYNAMIC_XP=0
|
MODULE_DYNAMIC_XP=0
|
||||||
MODULE_SOLO_LFG=0
|
MODULE_SOLO_LFG=1
|
||||||
MODULE_1V1_ARENA=0
|
MODULE_1V1_ARENA=0
|
||||||
MODULE_PHASED_DUELS=0
|
MODULE_PHASED_DUELS=0
|
||||||
|
|
||||||
@@ -127,7 +137,7 @@ MODULE_ELUNA=0
|
|||||||
MODULE_TIME_IS_TIME=0
|
MODULE_TIME_IS_TIME=0
|
||||||
MODULE_POCKET_PORTAL=0
|
MODULE_POCKET_PORTAL=0
|
||||||
MODULE_RANDOM_ENCHANTS=0
|
MODULE_RANDOM_ENCHANTS=0
|
||||||
MODULE_SOLOCRAFT=0
|
MODULE_SOLOCRAFT=1
|
||||||
MODULE_PVP_TITLES=0
|
MODULE_PVP_TITLES=0
|
||||||
MODULE_NPC_BEASTMASTER=0
|
MODULE_NPC_BEASTMASTER=0
|
||||||
MODULE_NPC_ENCHANTER=0
|
MODULE_NPC_ENCHANTER=0
|
||||||
|
|||||||
@@ -7,10 +7,20 @@
|
|||||||
# DEPLOYMENT CONFIGURATION
|
# DEPLOYMENT CONFIGURATION
|
||||||
# ==============================================
|
# ==============================================
|
||||||
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
||||||
STORAGE_ROOT=./storage
|
STORAGE_ROOT=/nfs/containers
|
||||||
# Storage configuration (must match database layer)
|
# Storage configuration (must match database layer)
|
||||||
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
||||||
|
|
||||||
|
# ==============================================
|
||||||
|
# USER MAPPING CONFIGURATION (for NFS compatibility)
|
||||||
|
# ==============================================
|
||||||
|
# User and group IDs for container processes
|
||||||
|
# Set these to match your NFS server's user mapping
|
||||||
|
# Default: 1001:1000 (matches 'sharing' user on most systems)
|
||||||
|
CONTAINER_USER_ID=1001
|
||||||
|
CONTAINER_GROUP_ID=1000
|
||||||
|
CONTAINER_USER=${CONTAINER_USER_ID}:${CONTAINER_GROUP_ID}
|
||||||
|
|
||||||
# ==============================================
|
# ==============================================
|
||||||
# NETWORK CONFIGURATION
|
# NETWORK CONFIGURATION
|
||||||
# ==============================================
|
# ==============================================
|
||||||
@@ -22,7 +32,7 @@ SOAP_EXTERNAL_PORT=7778
|
|||||||
# Server address for client connections (production)
|
# Server address for client connections (production)
|
||||||
# SERVER_ADDRESS=192.168.0.188
|
# SERVER_ADDRESS=192.168.0.188
|
||||||
# Server address for client connections (local)
|
# Server address for client connections (local)
|
||||||
SERVER_ADDRESS=127.0.0.1
|
SERVER_ADDRESS=192.168.0.188
|
||||||
# Use WORLD_EXTERNAL_PORT for realmlist (client connection port)
|
# Use WORLD_EXTERNAL_PORT for realmlist (client connection port)
|
||||||
REALM_PORT=8215
|
REALM_PORT=8215
|
||||||
|
|
||||||
|
|||||||
@@ -10,16 +10,17 @@ services:
|
|||||||
image: ${AC_CLIENT_DATA_IMAGE}
|
image: ${AC_CLIENT_DATA_IMAGE}
|
||||||
pull_policy: ${IMAGE_PULL_POLICY}
|
pull_policy: ${IMAGE_PULL_POLICY}
|
||||||
container_name: ${CONTAINER_CLIENT_DATA}
|
container_name: ${CONTAINER_CLIENT_DATA}
|
||||||
user: "${CONTAINER_USER}" # Use mapped user for NFS compatibility
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}/data:/azerothcore/data
|
- ${STORAGE_PATH}/data:/azerothcore/data
|
||||||
- ${STORAGE_PATH}/cache:/cache
|
- ${STORAGE_PATH}/cache:/cache
|
||||||
working_dir: /tmp
|
working_dir: /tmp
|
||||||
|
environment:
|
||||||
|
- CONTAINER_USER=${CONTAINER_USER}
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
# Auto-detect package manager and install dependencies
|
# Auto-detect package manager and install dependencies (as root)
|
||||||
if command -v apk >/dev/null 2>&1; then
|
if command -v apk >/dev/null 2>&1; then
|
||||||
# Alpine Linux
|
# Alpine Linux
|
||||||
apk add --no-cache curl unzip wget ca-certificates p7zip jq
|
apk add --no-cache curl unzip wget ca-certificates p7zip jq
|
||||||
@@ -34,14 +35,17 @@ services:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create cache directory if it doesn't exist
|
# Create cache directory with correct ownership
|
||||||
mkdir -p /cache
|
mkdir -p /cache
|
||||||
|
chown ${CONTAINER_USER} /cache /azerothcore/data 2>/dev/null || true
|
||||||
|
|
||||||
# Download and execute client data script from GitHub
|
# Download and execute client data script from GitHub as mapped user
|
||||||
echo "📥 Downloading 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
|
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
|
chmod +x /tmp/download-client-data.sh
|
||||||
/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
|
||||||
restart: "no"
|
restart: "no"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
@@ -143,7 +147,6 @@ services:
|
|||||||
image: ${ALPINE_GIT_IMAGE}
|
image: ${ALPINE_GIT_IMAGE}
|
||||||
pull_policy: ${IMAGE_PULL_POLICY}
|
pull_policy: ${IMAGE_PULL_POLICY}
|
||||||
container_name: ${CONTAINER_MODULES}
|
container_name: ${CONTAINER_MODULES}
|
||||||
user: "${CONTAINER_USER}" # Use mapped user for NFS compatibility
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}/modules:/modules
|
- ${STORAGE_PATH}/modules:/modules
|
||||||
- ${STORAGE_PATH}/config:/azerothcore/env/dist/etc
|
- ${STORAGE_PATH}/config:/azerothcore/env/dist/etc
|
||||||
@@ -193,17 +196,24 @@ services:
|
|||||||
- DB_AUTH_NAME=${DB_AUTH_NAME}
|
- DB_AUTH_NAME=${DB_AUTH_NAME}
|
||||||
- DB_WORLD_NAME=${DB_WORLD_NAME}
|
- DB_WORLD_NAME=${DB_WORLD_NAME}
|
||||||
- DB_CHARACTERS_NAME=${DB_CHARACTERS_NAME}
|
- DB_CHARACTERS_NAME=${DB_CHARACTERS_NAME}
|
||||||
|
- CONTAINER_USER=${CONTAINER_USER}
|
||||||
entrypoint: ["/bin/sh", "-c"]
|
entrypoint: ["/bin/sh", "-c"]
|
||||||
command:
|
command:
|
||||||
- |
|
- |
|
||||||
|
# Install packages as root
|
||||||
apk add --no-cache curl
|
apk add --no-cache curl
|
||||||
|
|
||||||
|
# Set ownership for module directories
|
||||||
|
mkdir -p /scripts
|
||||||
|
chown ${CONTAINER_USER} /modules /azerothcore/env/dist/etc 2>/dev/null || true
|
||||||
|
|
||||||
echo "📥 Downloading module management script from GitHub..."
|
echo "📥 Downloading module management script from GitHub..."
|
||||||
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/manage-modules.sh -o /tmp/manage-modules.sh
|
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/manage-modules.sh -o /tmp/manage-modules.sh
|
||||||
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/manage-modules-sql.sh -o /scripts/manage-modules-sql.sh
|
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
|
chmod +x /tmp/manage-modules.sh /scripts/manage-modules-sql.sh
|
||||||
|
|
||||||
/tmp/manage-modules.sh
|
# Run module management as mapped user
|
||||||
|
su -s /bin/sh $${CONTAINER_USER%%:*} -c '/tmp/manage-modules.sh' || /tmp/manage-modules.sh
|
||||||
restart: "no"
|
restart: "no"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
@@ -213,7 +223,6 @@ services:
|
|||||||
image: ${ALPINE_IMAGE}
|
image: ${ALPINE_IMAGE}
|
||||||
pull_policy: ${IMAGE_PULL_POLICY}
|
pull_policy: ${IMAGE_PULL_POLICY}
|
||||||
container_name: ${CONTAINER_POST_INSTALL}
|
container_name: ${CONTAINER_POST_INSTALL}
|
||||||
user: "${CONTAINER_USER}" # Use mapped user for NFS compatibility
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}/config:/azerothcore/config
|
- ${STORAGE_PATH}/config:/azerothcore/config
|
||||||
- ${STORAGE_PATH}/install-markers:/install-markers
|
- ${STORAGE_PATH}/install-markers:/install-markers
|
||||||
@@ -234,16 +243,20 @@ services:
|
|||||||
NETWORK_NAME: ${NETWORK_NAME}
|
NETWORK_NAME: ${NETWORK_NAME}
|
||||||
CONTAINER_AUTHSERVER: ${CONTAINER_AUTHSERVER}
|
CONTAINER_AUTHSERVER: ${CONTAINER_AUTHSERVER}
|
||||||
CONTAINER_WORLDSERVER: ${CONTAINER_WORLDSERVER}
|
CONTAINER_WORLDSERVER: ${CONTAINER_WORLDSERVER}
|
||||||
|
CONTAINER_USER: ${CONTAINER_USER}
|
||||||
depends_on:
|
depends_on:
|
||||||
- ac-modules
|
- ac-modules
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
# Install required packages
|
# Install required packages as root
|
||||||
echo "📦 Installing required packages..."
|
echo "📦 Installing required packages..."
|
||||||
apk add --no-cache bash curl docker-cli
|
apk add --no-cache bash curl docker-cli
|
||||||
|
|
||||||
|
# Set ownership for config directories
|
||||||
|
chown ${CONTAINER_USER} /azerothcore/config /install-markers 2>/dev/null || true
|
||||||
|
|
||||||
# Download post-install script from GitHub (fallback to local for testing)
|
# Download post-install script from GitHub (fallback to local for testing)
|
||||||
echo "📥 Downloading auto post-install script..."
|
echo "📥 Downloading auto post-install script..."
|
||||||
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/auto-post-install.sh -o /tmp/auto-post-install.sh
|
curl -fsSL https://raw.githubusercontent.com/uprightbass360/acore-compose/main/scripts/auto-post-install.sh -o /tmp/auto-post-install.sh
|
||||||
|
|||||||
@@ -8,10 +8,20 @@
|
|||||||
# TOOL STORAGE PATHS
|
# TOOL STORAGE PATHS
|
||||||
# ==============================================
|
# ==============================================
|
||||||
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
# Storage root path - local: ./storage, production: /nfs/containers or custom mount
|
||||||
STORAGE_ROOT=./storage
|
STORAGE_ROOT=/nfs/containers
|
||||||
# Storage for tools (unified with core stack)
|
# Storage for tools (unified with core stack)
|
||||||
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
STORAGE_PATH=${STORAGE_ROOT}/azerothcore
|
||||||
|
|
||||||
|
# ==============================================
|
||||||
|
# USER MAPPING CONFIGURATION (for NFS compatibility)
|
||||||
|
# ==============================================
|
||||||
|
# User and group IDs for container processes
|
||||||
|
# Set these to match your NFS server's user mapping
|
||||||
|
# Default: 1001:1000 (matches 'sharing' user on most systems)
|
||||||
|
CONTAINER_USER_ID=1001
|
||||||
|
CONTAINER_GROUP_ID=1000
|
||||||
|
CONTAINER_USER=${CONTAINER_USER_ID}:${CONTAINER_GROUP_ID}
|
||||||
|
|
||||||
# ==============================================
|
# ==============================================
|
||||||
# DATABASE CONNECTION
|
# DATABASE CONNECTION
|
||||||
# ==============================================
|
# ==============================================
|
||||||
|
|||||||
Reference in New Issue
Block a user