# Advanced Configuration ## Table of Contents - [Architecture Overview](#architecture-overview) - [Container Profiles](#container-profiles) - [Service Inventory & Ports](#service-inventory--ports) - [Database Hardening](#database-hardening) - [Compose Overrides](#compose-overrides) - [Storage Structure](#storage-structure) - [Build System](#build-system) - [Custom Configuration](#custom-configuration) --- This document provides technical details for advanced users and system administrators working with AzerothCore RealmMaster. It covers the internal architecture, configuration options, and customization capabilities for specialized deployments and development environments. ## Architecture Overview ### Container Profiles ```mermaid flowchart TB subgraph init["๐Ÿ”ง Initialization"] direction LR volinit["ac-volume-init
Docker Volume Permissions"] storinit["ac-storage-init
Storage Directory Permissions"] end subgraph database["๐Ÿ’พ Database Layer"] direction LR mysql["ac-mysql
MySQL 8.0
:64306"] dbinit["ac-db-init
Database Creation"] dbimport["ac-db-import
Schema Import"] backup["ac-backup
Automated Backups"] end subgraph clientdata["๐Ÿ“ฆ Client Data"] client["ac-client-data
WoW Assets (~15GB)"] end subgraph modmgmt["โš™๏ธ Module Management"] direction LR modmgr["ac-modules
Downloader & SQL"] postinst["ac-post-install
Configuration"] end subgraph services["๐ŸŽฎ Game Services"] direction TB subgraph standard["services-standard"] direction LR auth1["ac-authserver
:3784"] world1["ac-worldserver
:8215, :7778"] end subgraph playerbots["services-playerbots"] direction LR auth2["ac-authserver-playerbots
:3784"] world2["ac-worldserver-playerbots
:8215, :7778"] end subgraph mods["services-modules"] direction LR auth3["ac-authserver-modules
:3784"] world3["ac-worldserver-modules
:8215, :7778"] end end subgraph tools["๐Ÿ› ๏ธ Management Tools"] direction LR pma["ac-phpmyadmin
:8081"] keira["ac-keira3
:4201"] end init -.-> database database -.-> modmgmt database -.-> clientdata modmgmt -.-> services clientdata -.-> services database -.-> tools style init fill:#f5f5f5,stroke:#999,color:#000 style database fill:#e1ffe1,stroke:#4caf50,color:#000 style clientdata fill:#f0e1ff,stroke:#9c27b0,color:#000 style modmgmt fill:#ffe1e1,stroke:#f44336,color:#000 style services fill:#fff4e1,stroke:#ff9800,color:#000 style tools fill:#e1f5ff,stroke:#2196f3,color:#000 style standard fill:#fff9e1,color:#000 style playerbots fill:#fff9e1,color:#000 style mods fill:#fff9e1,color:#000 ``` **Profile Notes:** - **Initialization**: Auto-runs, no profile needed - **Database Layer**: `profile: db` - **Client Data**: `profile: client-data` or `client-data-bots` - **Module Management**: `profile: modules` - **Game Services**: ONE of `services-standard`, `services-playerbots`, or `services-modules` - **Management Tools**: `profile: tools` ### Service Inventory & Ports | Service / Container | Role | Ports (host โ†’ container) | Profile | |---------------------|------|--------------------------|---------| | `ac-mysql` | MySQL 8.0 database | *(optional)* `64306 โ†’ 3306` (`COMPOSE_OVERRIDE_MYSQL_EXPOSE_ENABLED=1`) | `db` | | `ac-db-init` | Database schema initialization | โ€“ | `db` | | `ac-db-import` | Database content import | โ€“ | `db` | | `ac-backup` | Automated backup system | โ€“ | `db` | | `ac-authserver` | Auth server (standard) | `3784 โ†’ 3724` | `services-standard` | | `ac-worldserver` | World server (standard) | `8215 โ†’ 8085`, `7778 โ†’ 7878` | `services-standard` | | `ac-authserver-playerbots` | Playerbots auth | `3784 โ†’ 3724` | `services-playerbots` | | `ac-worldserver-playerbots` | Playerbots world | `8215 โ†’ 8085`, `7778 โ†’ 7878` | `services-playerbots` | | `ac-authserver-modules` | Custom build auth | `3784 โ†’ 3724` | `services-modules` | | `ac-worldserver-modules` | Custom build world | `8215 โ†’ 8085`, `7778 โ†’ 7878` | `services-modules` | | `ac-client-data` | Client data fetcher | โ€“ | `client-data` | | `ac-modules` | Module manager | โ€“ | `modules` | | `ac-post-install` | Post-installation configuration | โ€“ | Auto-start | | `ac-phpmyadmin` | Database admin UI | `8081 โ†’ 80` | `tools` | | `ac-keira3` | Game content editor | `4201 โ†’ 8080` | `tools` | ## Database Hardening - **MySQL port exposure** โ€“ By default `COMPOSE_OVERRIDE_MYSQL_EXPOSE_ENABLED=0`, so `ac-mysql` is reachable only from the internal Docker network. Set it to `1` to publish `${MYSQL_EXTERNAL_PORT}` on the host; RealmMaster scripts automatically include `compose-overrides/mysql-expose.yml` so the override Just Works. If you invoke Compose manually, remember to add `-f compose-overrides/mysql-expose.yml`. You can follow the same `COMPOSE_OVERRIDE__ENABLED=1` pattern for any custom override files you drop into `compose-overrides/`. - **Worldserver debug logging** โ€“ Need extra verbosity temporarily? Flip `COMPOSE_OVERRIDE_WORLDSERVER_DEBUG_LOGGING_ENABLED=1` to include `compose-overrides/worldserver-debug-logging.yml`, which bumps `AC_LOG_LEVEL` across all worldserver profiles. Turn it back off once you're done to avoid noisy logs. - **Binary logging toggle** โ€“ `MYSQL_DISABLE_BINLOG=1` appends `--skip-log-bin` via the MySQL wrapper entrypoint to keep disk churn low (and match Playerbot guidance). Flip the flag to `0` to re-enable binlogs for debugging or replication. - **Drop-in configs** โ€“ Any `.cnf` placed in `${STORAGE_PATH}/config/mysql/conf.d` (exposed via `MYSQL_CONFIG_DIR`) is mounted into `/etc/mysql/conf.d`. Use this to add custom tunables or temporarily override the binlog setting without touching the image. ## Compose Overrides All helper scripts automatically include any override file found in `compose-overrides/` when its matching flag `COMPOSE_OVERRIDE__ENABLED` is set to `1` in `.env`. Each override declares its flag at the top with `# override-flag: ...`. This lets you ship opt-in tweaks without editing `docker-compose.yml`. Current examples: - `compose-overrides/mysql-expose.yml` (`COMPOSE_OVERRIDE_MYSQL_EXPOSE_ENABLED`) โ€“ Publishes MySQL to `${MYSQL_EXTERNAL_PORT}` for external clients. - `compose-overrides/worldserver-debug-logging.yml` (`COMPOSE_OVERRIDE_WORLDSERVER_DEBUG_LOGGING_ENABLED`) โ€“ Raises `AC_LOG_LEVEL` to `3` across all worldserver profiles for troubleshooting. Add your own override by dropping a new `.yml` file into `compose-overrides/`, documenting the flag name in a comment, and toggling that flag in `.env`. ## Storage Structure The project uses a dual-storage approach for optimal performance: **Primary Storage** (`STORAGE_PATH` - default: NFS mount or shared storage) ``` storage/ โ”œโ”€โ”€ config/ # Server configuration files (.conf) โ”‚ โ””โ”€โ”€ mysql/ โ”‚ โ””โ”€โ”€ conf.d/ # Drop-in MySQL overrides (mapped to /etc/mysql/conf.d) โ”œโ”€โ”€ client-data/ # Unpacked WoW client data & DBC overrides โ”œโ”€โ”€ logs/ # Server log files โ”œโ”€โ”€ modules/ # Downloaded module source code โ”œโ”€โ”€ lua_scripts/ # Eluna Lua scripts (auto-loaded) โ”œโ”€โ”€ install-markers/ # Module installation state tracking โ””โ”€โ”€ backups/ # Automated database backups โ”œโ”€โ”€ daily/ # Daily backups (retained per BACKUP_RETENTION_DAYS) โ””โ”€โ”€ hourly/ # Hourly backups (retained per BACKUP_RETENTION_HOURS) ``` `storage/client-data` is bind-mounted into every world/auth/client-data container. Drop patched `dbc`, `maps`, `vmaps`, or `mmaps` files directly into that folder (e.g., `storage/client-data/dbc/SkillLine.dbc`) and the containers will read them immediatelyโ€”perfect for modules like Individual Progression or mod-worgoblin that need to overwrite Blizzard data. Need to capture more than the default `auth/world/characters` schemas? Set `BACKUP_EXTRA_DATABASES` in `.env` (comma or space separated) and the `ac-backup` scheduler will validate each schema before adding it to the hourly/daily dump rotation. The long-standing auto-detection for `acore_playerbots` still works, and any missing optional schemas are logged and skipped instead of breaking the backup run. To tweak MySQL settings, place `.cnf` snippets in `storage/config/mysql/conf.d`. Files in this directory map straight to `/etc/mysql/conf.d` inside `ac-mysql`, so you can re-enable binary logs or tune buffers without rebuilding images. **Local Storage** (`STORAGE_PATH_LOCAL` - default: `./local-storage`) ``` local-storage/ โ”œโ”€โ”€ mysql-data/ # MySQL persistent data (tmpfs runtime + persistent snapshot) โ”œโ”€โ”€ client-data-cache/ # Downloaded WoW client data archives โ”œโ”€โ”€ source/ # AzerothCore source repository (created during builds) โ”‚ โ””โ”€โ”€ azerothcore-playerbots/ # Playerbot fork (when playerbots enabled) โ””โ”€โ”€ images/ # Exported Docker images for remote deployment ``` **Docker Volume** - `client-data-cache` - Temporary storage for client data downloads This separation ensures database and build artifacts stay on fast local storage while configuration, modules, and backups can be shared across hosts via NFS. ## Build System The build system is optimized for development and production deployments with Docker multi-stage builds and caching. **Build Configuration:** - Automated dependency resolution and compilation - Multi-stage Docker builds for optimal image sizes - Build artifact caching for faster rebuilds - Support for custom patches and modifications ## Custom Configuration Advanced customization options for specialized deployments and development environments. **Configuration Options:** - Environment-specific overrides in `docker-compose.override.yml` - Custom module loading and configuration - Database schema modifications and patches - Network and security configuration --- ## Related Documentation For additional information, see the following documents: - [Getting Started Guide](GETTING_STARTED.md) - Basic setup and deployment - [Module Documentation](MODULES.md) - Complete module catalog and configurations - [Script Reference](SCRIPTS.md) - Detailed script documentation and usage - [Main README](../README.md) - Project overview and quick start guide --- *This documentation is part of the AzerothCore RealmMaster project. For updates and contributions, visit the main project repository.*