diff --git a/chart/templates/databases.yaml b/chart/templates/databases.yaml index 3d1b70b..b5225bf 100644 --- a/chart/templates/databases.yaml +++ b/chart/templates/databases.yaml @@ -11,17 +11,17 @@ data: GRANT ALL PRIVILEGES ON * . * TO '{{ .Values.databases.db_user }}' WITH GRANT OPTION; - CREATE DATABASE `{{ .Values.databases.db_world_name }}` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci; + CREATE DATABASE IF NOT EXISTS `{{ .Values.databases.db_world_name }}` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci; - CREATE DATABASE `{{ .Values.databases.acore_characters }}` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci; + CREATE DATABASE IF NOT EXISTS `{{ .Values.databases.db_characters_name }}` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci; - CREATE DATABASE `{{ .Values.databases.acore_auth }}` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci; + CREATE DATABASE IF NOT EXISTS `{{ .Values.databases.db_auth_name }}` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON `{{ .Values.databases.db_world_name }}` . * TO '{{ .Values.databases.db_user }}' WITH GRANT OPTION; - GRANT ALL PRIVILEGES ON `{{ .Values.databases.acore_characters }}` . * TO '{{ .Values.databases.db_user }}' WITH GRANT OPTION; + GRANT ALL PRIVILEGES ON `{{ .Values.databases.db_characters_name }}` . * TO '{{ .Values.databases.db_user }}' WITH GRANT OPTION; - GRANT ALL PRIVILEGES ON `{{ .Values.databases.acore_auth }}` . * TO '{{ .Values.databases.db_user }}' WITH GRANT OPTION; + GRANT ALL PRIVILEGES ON `{{ .Values.databases.db_auth_name }}` . * TO '{{ .Values.databases.db_user }}' WITH GRANT OPTION; --- apiVersion: v1 @@ -33,7 +33,7 @@ stringData: user: "{{ .Values.databases.db_user }}" password: "{{ .Values.databases.db_password }}" schema_type: "{{ .Values.databases.db_schema_type }}" -{{- if ne .Values.mysql.external_db_hostname "" }} +{{- if ne .Values.databases.external_db_hostname "" }} AUTH_DB_CONNECTION: "{{ .Values.databases.db_user }}:{{ .Values.databases.db_password }}@tcp({{ .Values.databases.external_db_hostname }}:{{ .Values.databases.external_db_port }})/{{ .Values.databases.db_auth_name }}" CHAR_DB_CONNECTION: "{{ .Values.databases.db_user }}:{{ .Values.databases.db_password }}@tcp({{ .Values.databases.external_db_hostname }}:{{ .Values.databases.external_db_port }})/{{ .Values.databases.db_characters_name }}" WORLD_DB_CONNECTION: "{{ .Values.databases.db_user }}:{{ .Values.databases.db_password }}@tcp({{ .Values.databases.external_db_hostname }}:{{ .Values.databases.external_db_port }})/{{ .Values.databases.db_world_name }}" diff --git a/game-server/azerothcore/Dockerfile b/game-server/azerothcore/Dockerfile index c4d052b..4d4a609 100644 --- a/game-server/azerothcore/Dockerfile +++ b/game-server/azerothcore/Dockerfile @@ -70,6 +70,7 @@ COPY --from=build-sidecar ./go/src/github.com/walkline/ToCloud9/libsidecar.so /u COPY --from=build-core /repo/bin/etc/worldserver.conf.dist /repo/bin/etc/worldserver.conf COPY --from=build-core /repo/bin/bin/worldserver /repo/bin/worldserver +COPY --from=build-core /repo/data/sql/ /repo/data/sql/ WORKDIR /repo/bin