diff --git a/.env.template b/.env.template index fc97510..c04383a 100644 --- a/.env.template +++ b/.env.template @@ -1,6 +1,6 @@ # Copy this file to .env and adjust values for your environment. # Docker Compose will auto-load .env in the same folder as docker-compose.yml. -# Template for acore-compose profiles-based compose +# Template for AzerothCore-RealmMaster profiles-based compose # ===================== # Compose overrides (set to 1 to include matching file under compose-overrides/) @@ -13,7 +13,7 @@ COMPOSE_OVERRIDE_WORLDSERVER_DEBUG_LOGGING_ENABLED=0 # ===================== # Project name # ===================== -COMPOSE_PROJECT_NAME=acore-compose +COMPOSE_PROJECT_NAME=azerothcore-realmmaster # ===================== # Storage & Timezone @@ -56,12 +56,12 @@ AC_DB_IMPORT_IMAGE=acore/ac-wotlk-db-import:master AC_AUTHSERVER_IMAGE=acore/ac-wotlk-authserver:master AC_WORLDSERVER_IMAGE=acore/ac-wotlk-worldserver:master # Services (Playerbots) -AC_AUTHSERVER_IMAGE_PLAYERBOTS=acore-compose:authserver-playerbots -AC_WORLDSERVER_IMAGE_PLAYERBOTS=acore-compose:worldserver-playerbots +AC_AUTHSERVER_IMAGE_PLAYERBOTS=azerothcore-realmmaster:authserver-playerbots +AC_WORLDSERVER_IMAGE_PLAYERBOTS=azerothcore-realmmaster:worldserver-playerbots # Services (Module Build Tags) # Images used during module compilation and tagging -AC_AUTHSERVER_IMAGE_MODULES=acore-compose:authserver-modules-latest -AC_WORLDSERVER_IMAGE_MODULES=acore-compose:worldserver-modules-latest +AC_AUTHSERVER_IMAGE_MODULES=azerothcore-realmmaster:authserver-modules-latest +AC_WORLDSERVER_IMAGE_MODULES=azerothcore-realmmaster:worldserver-modules-latest # Client Data AC_CLIENT_DATA_IMAGE=acore/ac-wotlk-client-data:master AC_CLIENT_DATA_IMAGE_PLAYERBOTS=uprightbass360/azerothcore-wotlk-playerbots:client-data-Playerbot diff --git a/build.sh b/build.sh index 38fc5c0..4bb9cf9 100755 --- a/build.sh +++ b/build.sh @@ -369,13 +369,13 @@ sync_modules(){ } resolve_project_name(){ - local raw_name="$(read_env COMPOSE_PROJECT_NAME "acore-compose")" + local raw_name="$(read_env COMPOSE_PROJECT_NAME "azerothcore-realmmaster")" local sanitized sanitized="$(echo "$raw_name" | tr '[:upper:]' '[:lower:]')" sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi diff --git a/cleanup.sh b/cleanup.sh index 94548ba..8f3b1ba 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -144,14 +144,14 @@ sanitize_project_name(){ sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi echo "$sanitized" } -PROJECT_IMAGE_PREFIX="$(sanitize_project_name "${COMPOSE_PROJECT_NAME:-acore-compose}")" +PROJECT_IMAGE_PREFIX="$(sanitize_project_name "${COMPOSE_PROJECT_NAME:-azerothcore-realmmaster}")" remove_storage_dir(){ local path="$1" diff --git a/deploy.sh b/deploy.sh index 9056a01..50ec3f1 100755 --- a/deploy.sh +++ b/deploy.sh @@ -58,7 +58,7 @@ show_realm_ready(){ show_remote_plan(){ local plan_host="${REMOTE_HOST:-}" local plan_user="${REMOTE_USER:-}" - local plan_dir="${REMOTE_PROJECT_DIR:-~/acore-compose}" + local plan_dir="${REMOTE_PROJECT_DIR:-~/AzerothCore-RealmMaster}" printf '\n%b\n' "${BLUE}🧭 Remote Deployment Plan${NC}" printf '%b\n' "${YELLOW}├─ Validate build status locally${NC}" @@ -138,7 +138,7 @@ collect_remote_details(){ fi if [ -z "$REMOTE_PROJECT_DIR" ]; then - REMOTE_PROJECT_DIR="~/acore-compose" + REMOTE_PROJECT_DIR="~/AzerothCore-RealmMaster" fi if [ "$interactive" -eq 1 ]; then local dir_input @@ -182,7 +182,7 @@ validate_remote_configuration(){ fi fi if [ -z "$REMOTE_PROJECT_DIR" ]; then - REMOTE_PROJECT_DIR="~/acore-compose" + REMOTE_PROJECT_DIR="~/AzerothCore-RealmMaster" fi if [ ! -f "$ROOT_DIR/scripts/migrate-stack.sh" ]; then err "Migration script not found: $ROOT_DIR/scripts/migrate-stack.sh" @@ -207,7 +207,7 @@ Options: --remote-user USER SSH username for remote migration --remote-port PORT SSH port for remote migration (default: 22) --remote-identity PATH SSH private key for remote migration - --remote-project-dir DIR Remote project directory (default: ~/acore-compose) + --remote-project-dir DIR Remote project directory (default: ~/AzerothCore-RealmMaster) --remote-skip-storage Skip syncing the storage directory during migration -h, --help Show this help @@ -347,13 +347,13 @@ ensure_module_state(){ } resolve_project_name(){ - local raw_name="$(read_env COMPOSE_PROJECT_NAME "acore-compose")" + local raw_name="$(read_env COMPOSE_PROJECT_NAME "azerothcore-realmmaster")" local sanitized sanitized="$(echo "$raw_name" | tr '[:upper:]' '[:lower:]')" sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi @@ -702,7 +702,7 @@ main(){ show_step 2 "$remote_steps" "Migrating deployment to $REMOTE_HOST" if run_remote_migration; then ok "Remote deployment package prepared for $REMOTE_USER@$REMOTE_HOST." - local remote_dir="${REMOTE_PROJECT_DIR:-~/acore-compose}" + local remote_dir="${REMOTE_PROJECT_DIR:-~/AzerothCore-RealmMaster}" info "Run the following on the remote host to complete deployment:" printf ' %bcd %s && ./deploy.sh --yes --no-watch%b\n' "$YELLOW" "$remote_dir" "$NC" exit 0 diff --git a/docs/installing-azerothcore-with-docker.md b/docs/installing-azerothcore-with-docker.md index 1a5fe51..ec2a66a 100644 --- a/docs/installing-azerothcore-with-docker.md +++ b/docs/installing-azerothcore-with-docker.md @@ -102,7 +102,7 @@ set -euo pipefail PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)" docker compose -f "${PROJECT_DIR}/docker-compose.yml" \ --profile services-standard \ - -p "${COMPOSE_PROJECT_NAME:-acore-compose}" up -d --build + -p "${COMPOSE_PROJECT_NAME:-azerothcore-realmmaster}" up -d --build ``` diff --git a/scripts/deploy-tools.sh b/scripts/deploy-tools.sh index f639a9d..de3f101 100755 --- a/scripts/deploy-tools.sh +++ b/scripts/deploy-tools.sh @@ -34,12 +34,12 @@ read_env(){ resolve_project_name(){ local raw_name sanitized - raw_name="$(read_env COMPOSE_PROJECT_NAME "acore-compose")" + raw_name="$(read_env COMPOSE_PROJECT_NAME "azerothcore-realmmaster")" sanitized="$(echo "$raw_name" | tr '[:upper:]' '[:lower:]')" sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi diff --git a/scripts/migrate-stack.sh b/scripts/migrate-stack.sh index fda2e5a..46d2814 100755 --- a/scripts/migrate-stack.sh +++ b/scripts/migrate-stack.sh @@ -25,13 +25,13 @@ read_env_value(){ resolve_project_name(){ local raw_name - raw_name="$(read_env_value COMPOSE_PROJECT_NAME "acore-compose")" +raw_name="$(read_env_value COMPOSE_PROJECT_NAME "azerothcore-realmmaster")" local sanitized sanitized="$(echo "$raw_name" | tr '[:upper:]' '[:lower:]')" sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi @@ -79,7 +79,7 @@ Options: --user USER SSH username on remote host (required) --port PORT SSH port (default: 22) --identity PATH SSH private key (passed to scp/ssh) - --project-dir DIR Remote project directory (default: ~/acore-compose) + --project-dir DIR Remote project directory (default: ~/AzerothCore-RealmMaster) --tarball PATH Output path for the image tar (default: ./local-storage/images/acore-modules-images.tar) --storage PATH Remote storage directory (default: /storage) --skip-storage Do not sync the storage directory @@ -120,8 +120,19 @@ if [[ -z "$HOST" || -z "$USER" ]]; then exit 1 fi -PROJECT_DIR="${PROJECT_DIR:-/home/${USER}/acore-compose}" +expand_remote_path(){ + local path="$1" + case "$path" in + "~") echo "/home/${USER}";; + "~/"*) echo "/home/${USER}/${path#~/}";; + *) echo "$path";; + esac +} + +PROJECT_DIR="${PROJECT_DIR:-/home/${USER}/AzerothCore-RealmMaster}" +PROJECT_DIR="$(expand_remote_path "$PROJECT_DIR")" REMOTE_STORAGE="${REMOTE_STORAGE:-${PROJECT_DIR}/storage}" +REMOTE_STORAGE="$(expand_remote_path "$REMOTE_STORAGE")" LOCAL_STORAGE_ROOT="${STORAGE_PATH_LOCAL:-}" if [ -z "$LOCAL_STORAGE_ROOT" ]; then LOCAL_STORAGE_ROOT="$(read_env_value STORAGE_PATH_LOCAL "./local-storage")" diff --git a/scripts/rebuild-with-modules.sh b/scripts/rebuild-with-modules.sh index 1f6521f..86c5f32 100755 --- a/scripts/rebuild-with-modules.sh +++ b/scripts/rebuild-with-modules.sh @@ -98,13 +98,13 @@ ensure_project_image_tag(){ resolve_project_name(){ local raw_name - raw_name="$(read_env COMPOSE_PROJECT_NAME "acore-compose")" + raw_name="$(read_env COMPOSE_PROJECT_NAME "azerothcore-realmmaster")" local sanitized sanitized="$(echo "$raw_name" | tr '[:upper:]' '[:lower:]')" sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi diff --git a/scripts/stage-modules.sh b/scripts/stage-modules.sh index 84b51af..acda9ae 100755 --- a/scripts/stage-modules.sh +++ b/scripts/stage-modules.sh @@ -101,13 +101,13 @@ read_env(){ resolve_project_name(){ local raw_name - raw_name="$(read_env COMPOSE_PROJECT_NAME "acore-compose")" + raw_name="$(read_env COMPOSE_PROJECT_NAME "azerothcore-realmmaster")" local sanitized sanitized="$(echo "$raw_name" | tr '[:upper:]' '[:lower:]')" sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi diff --git a/scripts/verify-deployment.sh b/scripts/verify-deployment.sh index 421f076..56949d8 100755 --- a/scripts/verify-deployment.sh +++ b/scripts/verify-deployment.sh @@ -51,14 +51,14 @@ resolve_project_name(){ raw_name="$(grep -E '^COMPOSE_PROJECT_NAME=' "$env_path" | tail -n1 | cut -d'=' -f2-)" fi if [ -z "$raw_name" ]; then - raw_name="acore-compose" + raw_name="azerothcore-realmmaster" fi local sanitized sanitized="$(echo "$raw_name" | tr '[:upper:]' '[:lower:]')" sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi diff --git a/setup.sh b/setup.sh index 3ab8b06..7530344 100755 --- a/setup.sh +++ b/setup.sh @@ -50,7 +50,7 @@ sanitize_project_name(){ sanitized="${sanitized// /-}" sanitized="$(echo "$sanitized" | tr -cd 'a-z0-9_-')" if [[ -z "$sanitized" ]]; then - sanitized="acore-compose" + sanitized="azerothcore-realmmaster" elif [[ ! "$sanitized" =~ ^[a-z0-9] ]]; then sanitized="ac${sanitized}" fi