From 6787cf863e5e0ecb428d9a7485c39a18431101e7 Mon Sep 17 00:00:00 2001 From: Deckard Date: Sat, 27 Sep 2025 03:28:09 -0400 Subject: [PATCH] Fix all command syntax issues for Portainer compatibility - Convert MySQL command args from folded scalar to array format - Convert multiline script commands to Portainer-compatible syntax - Remove nested quoted strings that cause YAML parsing errors --- docker-compose.yml | 155 ++++++++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d25c589..5fa9734 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,13 +18,13 @@ services: - "${DOCKER_DB_EXTERNAL_PORT:-64306}:3306" volumes: - ${STORAGE_PATH_CONTAINERS}${STORAGE_PATH_CONTAINERS:+/azerothcore/mysql}${STORAGE_PATH_CONTAINERS:-ac_mysql_data}:/var/lib/mysql - command: > - --default-authentication-plugin=mysql_native_password - --character-set-server=utf8mb4 - --collation-server=utf8mb4_unicode_ci - --max_connections=1000 - --innodb-buffer-pool-size=256M - --innodb-log-file-size=64M + command: + - --default-authentication-plugin=mysql_native_password + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci + - --max_connections=1000 + - --innodb-buffer-pool-size=256M + - --innodb-log-file-size=64M restart: unless-stopped healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p${DOCKER_DB_ROOT_PASSWORD:-password}"] @@ -46,17 +46,18 @@ services: - azerothcore environment: MYSQL_PWD: ${DOCKER_DB_ROOT_PASSWORD:-password} - command: | - sh -c ' - echo "Creating AzerothCore databases..." - mysql -h ac-mysql -uroot -e " - CREATE DATABASE IF NOT EXISTS acore_auth DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - CREATE DATABASE IF NOT EXISTS acore_world DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - CREATE DATABASE IF NOT EXISTS acore_characters DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - SHOW DATABASES; - " || true - echo "Databases created!" - ' + command: + - sh + - -c + - | + echo "Creating AzerothCore databases..." + mysql -h ac-mysql -uroot -e " + CREATE DATABASE IF NOT EXISTS acore_auth DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + CREATE DATABASE IF NOT EXISTS acore_world DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + CREATE DATABASE IF NOT EXISTS acore_characters DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + SHOW DATABASES; + " || true + echo "Databases created!" restart: "no" # Step 3: Import AzerothCore database schema and data @@ -83,27 +84,26 @@ services: AC_LOGGER_SERVER_CONFIG: "1,Console" AC_APPENDER_CONSOLE_CONFIG: "1,2,0" entrypoint: ["/bin/bash", "-c"] - command: | - " - echo 'Waiting for databases to be ready...' - sleep 10 + command: + - | + echo 'Waiting for databases to be ready...' + sleep 10 - echo 'Creating config file for dbimport...' - mkdir -p /azerothcore/env/dist/etc - cat > /azerothcore/env/dist/etc/dbimport.conf < /azerothcore/env/dist/etc/dbimport.conf <