mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
startup issues
This commit is contained in:
@@ -118,9 +118,12 @@ 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: "0:0"
|
||||||
depends_on:
|
depends_on:
|
||||||
ac-mysql:
|
ac-mysql:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
ac-db-init:
|
||||||
|
condition: service_completed_successfully
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ 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: "0:0" # Run as root to install packages
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}/data:/azerothcore/data
|
- ${STORAGE_PATH}/data:/azerothcore/data
|
||||||
- ${STORAGE_PATH}/cache:/cache
|
- ${STORAGE_PATH}/cache:/cache
|
||||||
@@ -128,6 +129,7 @@ services:
|
|||||||
image: ${AC_ELUNA_IMAGE}
|
image: ${AC_ELUNA_IMAGE}
|
||||||
pull_policy: ${IMAGE_PULL_POLICY}
|
pull_policy: ${IMAGE_PULL_POLICY}
|
||||||
container_name: ${CONTAINER_ELUNA}
|
container_name: ${CONTAINER_ELUNA}
|
||||||
|
user: "0:0" # Run as root to handle NFS permissions
|
||||||
command: npm run dev
|
command: npm run dev
|
||||||
volumes:
|
volumes:
|
||||||
# TypeScript source files (input)
|
# TypeScript source files (input)
|
||||||
@@ -145,6 +147,7 @@ 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: "0:0" # Run as root to handle NFS permissions
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}/modules:/modules
|
- ${STORAGE_PATH}/modules:/modules
|
||||||
- ${STORAGE_PATH}/config:/azerothcore/env/dist/etc
|
- ${STORAGE_PATH}/config:/azerothcore/env/dist/etc
|
||||||
@@ -220,6 +223,7 @@ 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: "0:0" # Run as root for full permissions
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}/config:/azerothcore/config
|
- ${STORAGE_PATH}/config:/azerothcore/config
|
||||||
- ${STORAGE_PATH}/install-markers:/install-markers
|
- ${STORAGE_PATH}/install-markers:/install-markers
|
||||||
|
|||||||
@@ -139,6 +139,26 @@ if [ $UNZIP_EXIT_CODE -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Handle nested Data directory issue - move contents if extracted to Data subdirectory
|
||||||
|
if [ -d "/azerothcore/data/Data" ] && [ -n "$(ls -A /azerothcore/data/Data 2>/dev/null)" ]; then
|
||||||
|
echo '🔧 Fixing data directory structure (moving from Data/ subdirectory)...'
|
||||||
|
|
||||||
|
# Move all contents from Data subdirectory to the root data directory
|
||||||
|
for item in /azerothcore/data/Data/*; do
|
||||||
|
if [ -e "$item" ]; then
|
||||||
|
mv "$item" /azerothcore/data/ 2>/dev/null || {
|
||||||
|
echo "⚠️ Could not move $(basename "$item"), using copy instead..."
|
||||||
|
cp -r "$item" /azerothcore/data/
|
||||||
|
rm -rf "$item"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Remove empty Data directory
|
||||||
|
rmdir /azerothcore/data/Data 2>/dev/null || true
|
||||||
|
echo '✅ Data directory structure fixed'
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean up temporary extraction file (keep cached version)
|
# Clean up temporary extraction file (keep cached version)
|
||||||
rm -f data.zip
|
rm -f data.zip
|
||||||
|
|
||||||
|
|||||||
@@ -191,6 +191,69 @@ main() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Permission scheme selection
|
||||||
|
print_status "HEADER" "PERMISSION SCHEME"
|
||||||
|
echo "Select your container permission scheme:"
|
||||||
|
echo "1) Local Development (WSL/Docker Desktop)"
|
||||||
|
echo " - PUID=0, PGID=0 (root permissions)"
|
||||||
|
echo " - Best for: Local development, WSL, Docker Desktop"
|
||||||
|
echo " - Storage: Local directories with full access"
|
||||||
|
echo ""
|
||||||
|
echo "2) NFS Server Deployment"
|
||||||
|
echo " - PUID=1001, PGID=1000 (sharing user)"
|
||||||
|
echo " - Best for: NFS mounts, multi-user servers"
|
||||||
|
echo " - Storage: Network storage with user mapping"
|
||||||
|
echo ""
|
||||||
|
echo "3) Custom"
|
||||||
|
echo " - User-specified PUID/PGID values"
|
||||||
|
echo " - Best for: Specific user requirements"
|
||||||
|
echo " - Storage: User-specified storage path"
|
||||||
|
echo " - Manual PUID/PGID input with validation"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "$(echo -e "${YELLOW}🔧 Select permission scheme [1-3]: ${NC}")" permission_scheme
|
||||||
|
case $permission_scheme in
|
||||||
|
1)
|
||||||
|
PERMISSION_SCHEME="local-dev"
|
||||||
|
PUID=0
|
||||||
|
PGID=0
|
||||||
|
SCHEME_DESCRIPTION="Local Development (0:0) - Root permissions for local development"
|
||||||
|
print_status "INFO" "Permission scheme: Local Development"
|
||||||
|
echo " - PUID=0, PGID=0 (root permissions)"
|
||||||
|
echo " - Optimized for WSL and Docker Desktop environments"
|
||||||
|
echo ""
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
PERMISSION_SCHEME="nfs-server"
|
||||||
|
PUID=1001
|
||||||
|
PGID=1000
|
||||||
|
SCHEME_DESCRIPTION="NFS Server Deployment (1001:1000) - Sharing user for network storage"
|
||||||
|
print_status "INFO" "Permission scheme: NFS Server Deployment"
|
||||||
|
echo " - PUID=1001, PGID=1000 (sharing user)"
|
||||||
|
echo " - Compatible with NFS mounts and multi-user servers"
|
||||||
|
echo ""
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
PERMISSION_SCHEME="custom"
|
||||||
|
print_status "INFO" "Permission scheme: Custom"
|
||||||
|
echo " - Manual PUID/PGID configuration"
|
||||||
|
echo ""
|
||||||
|
PUID=$(prompt_input "Enter PUID (user ID)" "1000" validate_number)
|
||||||
|
PGID=$(prompt_input "Enter PGID (group ID)" "1000" validate_number)
|
||||||
|
SCHEME_DESCRIPTION="Custom (${PUID}:${PGID}) - User-specified permissions"
|
||||||
|
print_status "SUCCESS" "Custom permissions set: PUID=${PUID}, PGID=${PGID}"
|
||||||
|
echo ""
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
print_status "ERROR" "Please select 1, 2, or 3"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# Server configuration
|
# Server configuration
|
||||||
print_status "HEADER" "SERVER CONFIGURATION"
|
print_status "HEADER" "SERVER CONFIGURATION"
|
||||||
|
|
||||||
@@ -508,6 +571,7 @@ main() {
|
|||||||
# Summary
|
# Summary
|
||||||
print_status "HEADER" "CONFIGURATION SUMMARY"
|
print_status "HEADER" "CONFIGURATION SUMMARY"
|
||||||
echo "Deployment Type: $DEPLOYMENT_TYPE"
|
echo "Deployment Type: $DEPLOYMENT_TYPE"
|
||||||
|
echo "Permission Scheme: $SCHEME_DESCRIPTION"
|
||||||
echo "Server Address: $SERVER_ADDRESS"
|
echo "Server Address: $SERVER_ADDRESS"
|
||||||
echo "Client Port: $REALM_PORT"
|
echo "Client Port: $REALM_PORT"
|
||||||
echo "Auth Port: $AUTH_EXTERNAL_PORT"
|
echo "Auth Port: $AUTH_EXTERNAL_PORT"
|
||||||
@@ -595,6 +659,10 @@ main() {
|
|||||||
sed -i "s#BACKUP_DAILY_TIME=.*#BACKUP_DAILY_TIME=${BACKUP_DAILY_TIME}#" docker-compose-azerothcore-database-custom.env
|
sed -i "s#BACKUP_DAILY_TIME=.*#BACKUP_DAILY_TIME=${BACKUP_DAILY_TIME}#" docker-compose-azerothcore-database-custom.env
|
||||||
sed -i "s#TZ=.*#TZ=${TIMEZONE}#" docker-compose-azerothcore-database-custom.env
|
sed -i "s#TZ=.*#TZ=${TIMEZONE}#" docker-compose-azerothcore-database-custom.env
|
||||||
|
|
||||||
|
# Apply permission scheme settings
|
||||||
|
sed -i "s#PUID=.*#PUID=${PUID}#" docker-compose-azerothcore-database-custom.env
|
||||||
|
sed -i "s#PGID=.*#PGID=${PGID}#" docker-compose-azerothcore-database-custom.env
|
||||||
|
|
||||||
# Toggle database images based on playerbots module selection
|
# Toggle database images based on playerbots module selection
|
||||||
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||||
# Swap AC_DB_IMPORT_IMAGE to enable mod-playerbots database
|
# Swap AC_DB_IMPORT_IMAGE to enable mod-playerbots database
|
||||||
@@ -616,6 +684,10 @@ main() {
|
|||||||
sed -i "s#SERVER_ADDRESS=.*#SERVER_ADDRESS=${SERVER_ADDRESS}#" docker-compose-azerothcore-services-custom.env
|
sed -i "s#SERVER_ADDRESS=.*#SERVER_ADDRESS=${SERVER_ADDRESS}#" docker-compose-azerothcore-services-custom.env
|
||||||
sed -i "s#REALM_PORT=.*#REALM_PORT=${REALM_PORT}#" docker-compose-azerothcore-services-custom.env
|
sed -i "s#REALM_PORT=.*#REALM_PORT=${REALM_PORT}#" docker-compose-azerothcore-services-custom.env
|
||||||
|
|
||||||
|
# Apply permission scheme settings
|
||||||
|
sed -i "s#PUID=.*#PUID=${PUID}#" docker-compose-azerothcore-services-custom.env
|
||||||
|
sed -i "s#PGID=.*#PGID=${PGID}#" docker-compose-azerothcore-services-custom.env
|
||||||
|
|
||||||
# Toggle Docker images based on playerbots module selection
|
# Toggle Docker images based on playerbots module selection
|
||||||
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||||
# Swap specific images that have _DISABLED variants
|
# Swap specific images that have _DISABLED variants
|
||||||
@@ -639,6 +711,10 @@ main() {
|
|||||||
# Substitute values in tools env file using a different delimiter
|
# Substitute values in tools env file using a different delimiter
|
||||||
sed -i "s#STORAGE_ROOT=.*#STORAGE_ROOT=${STORAGE_ROOT}#" docker-compose-azerothcore-tools-custom.env
|
sed -i "s#STORAGE_ROOT=.*#STORAGE_ROOT=${STORAGE_ROOT}#" docker-compose-azerothcore-tools-custom.env
|
||||||
|
|
||||||
|
# Apply permission scheme settings
|
||||||
|
sed -i "s#PUID=.*#PUID=${PUID}#" docker-compose-azerothcore-tools-custom.env
|
||||||
|
sed -i "s#PGID=.*#PGID=${PGID}#" docker-compose-azerothcore-tools-custom.env
|
||||||
|
|
||||||
# Toggle tools images based on playerbots module selection
|
# Toggle tools images based on playerbots module selection
|
||||||
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||||
# Swap AC_TOOLS_IMAGE to enable mod-playerbots tools
|
# Swap AC_TOOLS_IMAGE to enable mod-playerbots tools
|
||||||
@@ -656,6 +732,10 @@ main() {
|
|||||||
sed -i "s#STORAGE_ROOT=.*#STORAGE_ROOT=${STORAGE_ROOT}#" docker-compose-azerothcore-modules-custom.env
|
sed -i "s#STORAGE_ROOT=.*#STORAGE_ROOT=${STORAGE_ROOT}#" docker-compose-azerothcore-modules-custom.env
|
||||||
sed -i "s#MYSQL_ROOT_PASSWORD=.*#MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}#" docker-compose-azerothcore-modules-custom.env
|
sed -i "s#MYSQL_ROOT_PASSWORD=.*#MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}#" docker-compose-azerothcore-modules-custom.env
|
||||||
|
|
||||||
|
# Apply permission scheme settings
|
||||||
|
sed -i "s#PUID=.*#PUID=${PUID}#" docker-compose-azerothcore-modules-custom.env
|
||||||
|
sed -i "s#PGID=.*#PGID=${PGID}#" docker-compose-azerothcore-modules-custom.env
|
||||||
|
|
||||||
# Set all module variables
|
# Set all module variables
|
||||||
sed -i "s#MODULE_PLAYERBOTS=.*#MODULE_PLAYERBOTS=${MODULE_PLAYERBOTS}#" docker-compose-azerothcore-modules-custom.env
|
sed -i "s#MODULE_PLAYERBOTS=.*#MODULE_PLAYERBOTS=${MODULE_PLAYERBOTS}#" docker-compose-azerothcore-modules-custom.env
|
||||||
sed -i "s#MODULE_AOE_LOOT=.*#MODULE_AOE_LOOT=${MODULE_AOE_LOOT}#" docker-compose-azerothcore-modules-custom.env
|
sed -i "s#MODULE_AOE_LOOT=.*#MODULE_AOE_LOOT=${MODULE_AOE_LOOT}#" docker-compose-azerothcore-modules-custom.env
|
||||||
|
|||||||
Reference in New Issue
Block a user