mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 09:07:20 +00:00
fixing root containers
This commit is contained in:
@@ -53,7 +53,7 @@ services:
|
|||||||
profiles: ["db"]
|
profiles: ["db"]
|
||||||
image: ${AC_DB_IMPORT_IMAGE}
|
image: ${AC_DB_IMPORT_IMAGE}
|
||||||
container_name: ${CONTAINER_DB_IMPORT}
|
container_name: ${CONTAINER_DB_IMPORT}
|
||||||
user: "0:0"
|
user: "${CONTAINER_USER}"
|
||||||
userns_mode: "keep-id"
|
userns_mode: "keep-id"
|
||||||
depends_on:
|
depends_on:
|
||||||
ac-mysql:
|
ac-mysql:
|
||||||
@@ -90,7 +90,6 @@ services:
|
|||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
chown ${CONTAINER_USER} /azerothcore/env/dist/etc 2>/dev/null || true
|
|
||||||
echo "📥 Using local database import script..."
|
echo "📥 Using local database import script..."
|
||||||
/tmp/db-import-conditional.sh
|
/tmp/db-import-conditional.sh
|
||||||
restart: "no"
|
restart: "no"
|
||||||
@@ -206,7 +205,7 @@ services:
|
|||||||
user: "${CONTAINER_USER}"
|
user: "${CONTAINER_USER}"
|
||||||
volumes:
|
volumes:
|
||||||
- ac-client-data:/azerothcore/data
|
- ac-client-data:/azerothcore/data
|
||||||
- ${CLIENT_DATA_CACHE_PATH}:/cache
|
- client-data-cache:/cache
|
||||||
- ./scripts:/tmp/scripts:ro
|
- ./scripts:/tmp/scripts:ro
|
||||||
working_dir: /tmp
|
working_dir: /tmp
|
||||||
environment:
|
environment:
|
||||||
@@ -234,7 +233,7 @@ services:
|
|||||||
user: "${CONTAINER_USER}"
|
user: "${CONTAINER_USER}"
|
||||||
volumes:
|
volumes:
|
||||||
- ac-client-data:/azerothcore/data
|
- ac-client-data:/azerothcore/data
|
||||||
- ${CLIENT_DATA_CACHE_PATH}:/cache
|
- client-data-cache:/cache
|
||||||
- ./scripts:/tmp/scripts:ro
|
- ./scripts:/tmp/scripts:ro
|
||||||
working_dir: /tmp
|
working_dir: /tmp
|
||||||
environment:
|
environment:
|
||||||
@@ -523,7 +522,7 @@ services:
|
|||||||
profiles: ["modules"]
|
profiles: ["modules"]
|
||||||
image: ${ALPINE_GIT_IMAGE}
|
image: ${ALPINE_GIT_IMAGE}
|
||||||
container_name: ${CONTAINER_MODULES}
|
container_name: ${CONTAINER_MODULES}
|
||||||
user: "0:0"
|
user: "${CONTAINER_USER}"
|
||||||
depends_on:
|
depends_on:
|
||||||
ac-mysql:
|
ac-mysql:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -600,7 +599,7 @@ services:
|
|||||||
profiles: ["modules"]
|
profiles: ["modules"]
|
||||||
image: ${ALPINE_IMAGE}
|
image: ${ALPINE_IMAGE}
|
||||||
container_name: ${CONTAINER_POST_INSTALL}
|
container_name: ${CONTAINER_POST_INSTALL}
|
||||||
user: "0:0"
|
user: "${CONTAINER_USER}"
|
||||||
volumes:
|
volumes:
|
||||||
- ${STORAGE_PATH}/config:/azerothcore/config
|
- ${STORAGE_PATH}/config:/azerothcore/config
|
||||||
- ${STORAGE_PATH}/install-markers:/install-markers
|
- ${STORAGE_PATH}/install-markers:/install-markers
|
||||||
@@ -635,7 +634,6 @@ services:
|
|||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
apk add --no-cache bash curl docker-cli
|
apk add --no-cache bash curl docker-cli
|
||||||
chown ${CONTAINER_USER} /azerothcore/config /install-markers 2>/dev/null || true
|
|
||||||
echo "📥 Running local auto-post-install script..."
|
echo "📥 Running local auto-post-install script..."
|
||||||
(chmod +x /tmp/scripts/auto-post-install.sh 2>/dev/null || true) && bash /tmp/scripts/auto-post-install.sh
|
(chmod +x /tmp/scripts/auto-post-install.sh 2>/dev/null || true) && bash /tmp/scripts/auto-post-install.sh
|
||||||
restart: "no"
|
restart: "no"
|
||||||
@@ -708,6 +706,8 @@ volumes:
|
|||||||
ac-client-data:
|
ac-client-data:
|
||||||
name: ${CLIENT_DATA_VOLUME}
|
name: ${CLIENT_DATA_VOLUME}
|
||||||
driver: local
|
driver: local
|
||||||
|
client-data-cache:
|
||||||
|
driver: local
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
azerothcore:
|
azerothcore:
|
||||||
|
|||||||
@@ -237,7 +237,6 @@ if [[ $SKIP_STORAGE -eq 0 ]]; then
|
|||||||
if [[ -d "$LOCAL_MODULES_DIR" ]]; then
|
if [[ -d "$LOCAL_MODULES_DIR" ]]; then
|
||||||
echo "⋅ Syncing module staging to remote"
|
echo "⋅ Syncing module staging to remote"
|
||||||
run_ssh "rm -rf '$REMOTE_STORAGE/modules' && mkdir -p '$REMOTE_STORAGE/modules'"
|
run_ssh "rm -rf '$REMOTE_STORAGE/modules' && mkdir -p '$REMOTE_STORAGE/modules'"
|
||||||
local modules_tar
|
|
||||||
modules_tar=$(mktemp)
|
modules_tar=$(mktemp)
|
||||||
tar -cf "$modules_tar" -C "$LOCAL_MODULES_DIR" .
|
tar -cf "$modules_tar" -C "$LOCAL_MODULES_DIR" .
|
||||||
run_scp "$modules_tar" "$USER@$HOST:/tmp/acore-modules.tar"
|
run_scp "$modules_tar" "$USER@$HOST:/tmp/acore-modules.tar"
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ sync_local_staging(){
|
|||||||
|
|
||||||
if [ ! -d "$src_modules" ]; then
|
if [ ! -d "$src_modules" ]; then
|
||||||
echo "ℹ️ No local module staging found at $src_modules (skipping sync)."
|
echo "ℹ️ No local module staging found at $src_modules (skipping sync)."
|
||||||
|
# Check if modules exist in destination storage
|
||||||
|
if [ -d "$dest_modules" ] && [ -n "$(ls -A "$dest_modules" 2>/dev/null)" ]; then
|
||||||
|
local module_count
|
||||||
|
module_count=$(find "$dest_modules" -maxdepth 1 -type d | wc -l)
|
||||||
|
module_count=$((module_count - 1)) # Subtract 1 for the parent directory
|
||||||
|
if [ "$module_count" -gt 0 ]; then
|
||||||
|
echo "✅ Found $module_count modules in shared storage at $dest_modules"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user