diff --git a/.env.template b/.env.template index abfd32c..7833356 100644 --- a/.env.template +++ b/.env.template @@ -57,6 +57,8 @@ AC_WORLDSERVER_IMAGE_PLAYERBOTS=uprightbass360/azerothcore-wotlk-playerbots:worl AC_CLIENT_DATA_IMAGE=acore/ac-wotlk-client-data:14.0.0-dev AC_CLIENT_DATA_IMAGE_PLAYERBOTS=uprightbass360/azerothcore-wotlk-playerbots:client-data-Playerbot CLIENT_DATA_VERSION=v16 +CLIENT_DATA_CACHE_PATH=./client-data-cache +CLIENT_DATA_VOLUME=ac-client-data # ===================== # Ports diff --git a/README.md b/README.md index 71a5b93..895e135 100644 --- a/README.md +++ b/README.md @@ -322,13 +322,14 @@ Use this workflow to build locally, then push the same stack to a remote host: ``` storage/ ├── config/ # Server configuration files -├── data/ # Game client data (maps, DBC files) ├── logs/ # Server log files ├── modules/ # Module source code and configs ├── mysql-data/ # Database files └── backups/ # Automated database backups ``` +`ac-client-data` keeps unpacked game assets in the `${CLIENT_DATA_VOLUME:-ac-client-data}` Docker volume so reads stay on the local host, while download archives are cached under `${CLIENT_DATA_CACHE_PATH:-./client-data-cache}` on fast local storage even when `${STORAGE_PATH}` points to remote or NFS storage. + --- ## 🛠️ Management Commands diff --git a/compose.yml b/compose.yml index 650b8c7..629e9a0 100644 --- a/compose.yml +++ b/compose.yml @@ -178,8 +178,8 @@ services: container_name: ac-client-data user: "0:0" volumes: - - ${STORAGE_PATH:-./storage}/data:/azerothcore/data - - ${STORAGE_PATH:-./storage}/cache:/cache + - ac-client-data:/azerothcore/data + - ${CLIENT_DATA_CACHE_PATH:-./client-data-cache}:/cache - ./scripts:/tmp/scripts:ro working_dir: /tmp environment: @@ -213,8 +213,8 @@ services: container_name: ac-client-data user: "0:0" volumes: - - ${STORAGE_PATH:-./storage}/data:/azerothcore/data - - ${STORAGE_PATH:-./storage}/cache:/cache + - ac-client-data:/azerothcore/data + - ${CLIENT_DATA_CACHE_PATH:-./client-data-cache}:/cache - ./scripts:/tmp/scripts:ro working_dir: /tmp environment: @@ -314,7 +314,7 @@ services: - "${WORLD_EXTERNAL_PORT:-8215}:${WORLD_PORT:-8085}" - "${SOAP_EXTERNAL_PORT:-7778}:${SOAP_PORT:-7878}" volumes: - - ${STORAGE_PATH:-./storage}/data:/azerothcore/data + - ac-client-data:/azerothcore/data - ${STORAGE_PATH:-./storage}/config:/azerothcore/env/dist/etc - ${STORAGE_PATH:-./storage}/logs:/azerothcore/logs - ${STORAGE_PATH:-./storage}/modules:/azerothcore/modules @@ -437,7 +437,7 @@ services: - "${WORLD_EXTERNAL_PORT:-8215}:${WORLD_PORT:-8085}" - "${SOAP_EXTERNAL_PORT:-7778}:${SOAP_PORT:-7878}" volumes: - - ${STORAGE_PATH:-./storage}/data:/azerothcore/data + - ac-client-data:/azerothcore/data - ${STORAGE_PATH:-./storage}/config:/azerothcore/env/dist/etc - ${STORAGE_PATH:-./storage}/logs:/azerothcore/logs - ${STORAGE_PATH:-./storage}/modules:/azerothcore/modules @@ -484,7 +484,7 @@ services: PLAYERBOT_MAX_BOTS: "${PLAYERBOT_MAX_BOTS:-40}" AC_LOG_LEVEL: "2" volumes: - - ${STORAGE_PATH:-./storage}/data:/azerothcore/data + - ac-client-data:/azerothcore/data - ${STORAGE_PATH:-./storage}/config:/azerothcore/env/dist/etc - ${STORAGE_PATH:-./storage}/logs:/azerothcore/logs - ${STORAGE_PATH:-./storage}/modules:/azerothcore/modules @@ -681,6 +681,11 @@ services: networks: - azerothcore +volumes: + ac-client-data: + name: ${CLIENT_DATA_VOLUME:-ac-client-data} + driver: local + networks: azerothcore: name: ${NETWORK_NAME:-azerothcore}