mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
directory staging
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,3 +20,4 @@ todo.md
|
|||||||
.gocache/
|
.gocache/
|
||||||
.module-ledger/
|
.module-ledger/
|
||||||
deploy.log
|
deploy.log
|
||||||
|
statusdash
|
||||||
@@ -41,6 +41,7 @@ services:
|
|||||||
- --innodb-redo-log-capacity=${MYSQL_INNODB_REDO_LOG_CAPACITY}
|
- --innodb-redo-log-capacity=${MYSQL_INNODB_REDO_LOG_CAPACITY}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging:
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "sh", "-c", "mysqladmin ping -h localhost -u ${MYSQL_USER} -p${MYSQL_ROOT_PASSWORD} --silent || exit 1"]
|
test: ["CMD", "sh", "-c", "mysqladmin ping -h localhost -u ${MYSQL_USER} -p${MYSQL_ROOT_PASSWORD} --silent || exit 1"]
|
||||||
interval: ${MYSQL_HEALTHCHECK_INTERVAL}
|
interval: ${MYSQL_HEALTHCHECK_INTERVAL}
|
||||||
@@ -351,7 +352,7 @@ services:
|
|||||||
profiles: ["db", "modules"]
|
profiles: ["db", "modules"]
|
||||||
image: ${ALPINE_IMAGE}
|
image: ${ALPINE_IMAGE}
|
||||||
container_name: ac-storage-init
|
container_name: ac-storage-init
|
||||||
user: "${CONTAINER_USER}"
|
user: "0:0"
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}:/storage-root
|
- ${STORAGE_PATH}:/storage-root
|
||||||
- ${STORAGE_PATH_LOCAL}:/local-storage-root
|
- ${STORAGE_PATH_LOCAL}:/local-storage-root
|
||||||
@@ -359,24 +360,18 @@ services:
|
|||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
echo "🔧 Initializing storage directories with proper permissions..."
|
echo "🔧 Initializing storage directories with container user ownership..."
|
||||||
mkdir -p /storage-root/config /storage-root/logs /storage-root/modules /storage-root/lua_scripts /storage-root/install-markers
|
mkdir -p /storage-root/config /storage-root/logs /storage-root/modules /storage-root/lua_scripts /storage-root/install-markers
|
||||||
mkdir -p /storage-root/config/mysql/conf.d
|
mkdir -p /storage-root/config/mysql/conf.d
|
||||||
mkdir -p /storage-root/client-data
|
mkdir -p /storage-root/client-data
|
||||||
mkdir -p /storage-root/backups
|
mkdir -p /storage-root/backups
|
||||||
# Copy core config files if they don't exist
|
mkdir -p /storage-root/module-sql-updates
|
||||||
if [ -f "/local-storage-root/source/azerothcore-playerbots/src/tools/dbimport/dbimport.conf.dist" ] && [ ! -f "/storage-root/config/dbimport.conf.dist" ]; then
|
mkdir -p /storage-root/data
|
||||||
echo "📄 Copying dbimport.conf.dist..."
|
mkdir -p /storage-root/temp
|
||||||
cp /local-storage-root/source/azerothcore-playerbots/src/tools/dbimport/dbimport.conf.dist /storage-root/config/
|
mkdir -p /local-storage-root || true
|
||||||
fi
|
chown -R ${CONTAINER_USER} /storage-root /local-storage-root 2>/dev/null || true
|
||||||
# Fix ownership of root directories and all contents
|
chmod -R 755 /storage-root /local-storage-root 2>/dev/null || true
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
echo "✅ Storage directories ready (owned by ${CONTAINER_USER})"
|
||||||
chown -R ${CONTAINER_USER} /storage-root /local-storage-root
|
|
||||||
chmod -R 755 /storage-root /local-storage-root
|
|
||||||
echo "✅ Storage permissions initialized"
|
|
||||||
else
|
|
||||||
echo "ℹ️ Running as $(id -u):$(id -g); assuming host permissions are already correct."
|
|
||||||
fi
|
|
||||||
restart: "no"
|
restart: "no"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
@@ -405,6 +400,8 @@ services:
|
|||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
mkdir -p /cache
|
mkdir -p /cache
|
||||||
|
chown -R ${CONTAINER_USER} /azerothcore/data /cache 2>/dev/null || true
|
||||||
|
chmod -R 755 /azerothcore/data /cache 2>/dev/null || true
|
||||||
if [ -f /tmp/scripts/bash/download-client-data.sh ]; then
|
if [ -f /tmp/scripts/bash/download-client-data.sh ]; then
|
||||||
chmod +x /tmp/scripts/bash/download-client-data.sh 2>/dev/null || true
|
chmod +x /tmp/scripts/bash/download-client-data.sh 2>/dev/null || true
|
||||||
bash /tmp/scripts/bash/download-client-data.sh
|
bash /tmp/scripts/bash/download-client-data.sh
|
||||||
@@ -437,6 +434,9 @@ services:
|
|||||||
- |
|
- |
|
||||||
echo "📦 Installing 7z + gosu for client data extraction..."
|
echo "📦 Installing 7z + gosu for client data extraction..."
|
||||||
apt-get update -qq && apt-get install -y p7zip-full gosu
|
apt-get update -qq && apt-get install -y p7zip-full gosu
|
||||||
|
echo "🔧 Normalizing client-data/cache ownership..."
|
||||||
|
chown -R ${CONTAINER_USER} /azerothcore/data /cache 2>/dev/null || true
|
||||||
|
chmod -R 755 /azerothcore/data /cache 2>/dev/null || true
|
||||||
gosu ${CONTAINER_USER} bash -c '
|
gosu ${CONTAINER_USER} bash -c '
|
||||||
set -e
|
set -e
|
||||||
mkdir -p /cache
|
mkdir -p /cache
|
||||||
@@ -479,6 +479,7 @@ services:
|
|||||||
- "${AUTH_EXTERNAL_PORT}:${AUTH_PORT}"
|
- "${AUTH_EXTERNAL_PORT}:${AUTH_PORT}"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging:
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
volumes:
|
volumes:
|
||||||
@@ -534,6 +535,7 @@ services:
|
|||||||
- ${STORAGE_PATH}/lua_scripts:/azerothcore/lua_scripts
|
- ${STORAGE_PATH}/lua_scripts:/azerothcore/lua_scripts
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging:
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
cap_add: ["SYS_NICE"]
|
cap_add: ["SYS_NICE"]
|
||||||
@@ -612,6 +614,7 @@ services:
|
|||||||
- "${AUTH_EXTERNAL_PORT}:${AUTH_PORT}"
|
- "${AUTH_EXTERNAL_PORT}:${AUTH_PORT}"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging:
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
volumes:
|
volumes:
|
||||||
@@ -670,6 +673,7 @@ services:
|
|||||||
- ${STORAGE_PATH}/lua_scripts:/azerothcore/lua_scripts
|
- ${STORAGE_PATH}/lua_scripts:/azerothcore/lua_scripts
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
logging:
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
networks:
|
networks:
|
||||||
- azerothcore
|
- azerothcore
|
||||||
cap_add: ["SYS_NICE"]
|
cap_add: ["SYS_NICE"]
|
||||||
@@ -878,6 +882,7 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
logging:
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user