Feat(Docker/bash): docker-compose system rework (#4488)

## ⚠️ATTENTION! ⚠️ Upgrading procedure:

**Database:** After this PR will be merged you need to backup your DB first (you can use the db-assembler or any mysql client to generate the dump) and restore it after.  The reason is that we use now docker named volumes instead of binded ones to improve performance.

**Conf & client data**: if you use the default configuration, both the etc and the data folder are now available inside the **/env/docker**. 

Finally, you can cleanup the /docker folder previously used by our system.

## Changes Proposed:

This PR will implement the [devcontainer ](https://code.visualstudio.com/docs/remote/containers) feature for VSCode. Allowing us to develop and debug directly within the container in the same way on all OSes.

* Implemented support for vscode dev-container feature by remote-extension suite
* Docker performance optimizations for MacOS and non-linux hosts
* Bash system improvements
* Implemented first command using Deno runtime environment (typescript) and [commander.js]
* Implemented wait mechanism for db_assembler
* Implemented db migration command
* possibility to run the authserver and worldserver with GDB using the integrated simple-restarter
* Implemented docker multi-stage mechanism to use one single Dockerfile for all the services
* client-data downloader now creates a placeholder to avoid downloading the same version of data files multiple times
* deployment of pre-compiled docker images on [docker hub](https://hub.docker.com/u/acore), you can test them [here](https://github.com/azerothcore/acore-docker)
This commit is contained in:
Yehonal
2021-04-22 09:57:05 +02:00
committed by GitHub
parent 4a8faafaff
commit 380f406248
100 changed files with 2747 additions and 777 deletions
+50
View File
@@ -0,0 +1,50 @@
!.gitignore
!*
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject
+12
View File
@@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = https://github.com/azerothcore/cmake-utils
branch = master
commit = 1589c53ac61b7909c6950f1d85833441cbd58790
method = merge
cmdver = 0.4.3
parent = ebcbd4e904f835beef8db05c88f2e971c48c2820
View File
+137
View File
@@ -0,0 +1,137 @@
#
# CU_SUBDIRLIST
#
FUNCTION(CU_SUBDIRLIST result curdir recursive includeRoot)
# glob recurse seem's doesn't work
FILE(GLOB children RELATIVE ${curdir} "${curdir}/[^\\.]*")
if (${includeRoot})
SET(dirlist "${curdir}")
else()
SET(dirlist "")
endif()
FOREACH(child ${children})
IF(IS_DIRECTORY "${curdir}/${child}")
if (${recursive})
CU_SUBDIRLIST(sub_Dirs "${curdir}/${child}" TRUE FALSE)
SET(dirlist "${curdir}/${child}" ${sub_Dirs} ${dirlist})
else()
SET(dirlist "${curdir}/${child}" ${dirlist})
endif()
ENDIF()
ENDFOREACH()
SET(${result} ${dirlist} PARENT_SCOPE)
ENDFUNCTION(CU_SUBDIRLIST result curdir recursive)
#
# CU_SET_GLOBAL
#
MACRO(CU_SET_GLOBAL name val)
set_property ( GLOBAL PROPERTY ${name} ${val})
# after set , create the variable for current scope
CU_GET_GLOBAL(${name})
ENDMACRO()
MACRO(CU_ADD_GLOBAL name val)
CU_GET_GLOBAL(${name})
set_property ( GLOBAL PROPERTY ${name}
${${name}}
${val}
)
# after set , create the variable for current scope
CU_GET_GLOBAL(${name})
ENDMACRO()
#
# CU_GET_GLOBAL
#
MACRO(CU_GET_GLOBAL name)
get_property(${name} GLOBAL PROPERTY ${name})
ENDMACRO()
#
# CU_SET_CACHE
#
MACRO(CU_SET_CACHE name val)
set(${name} ${val} CACHE INTERNAL "CU Var")
ENDMACRO()
#
# CU_LIST_ADD_CACHE
#
MACRO(CU_LIST_ADD_CACHE name val)
# avoid duplicates
if (";${${name}};" MATCHES ";${val};")
# nothing to do for now
else()
set(${name} ${val} ${${name}} CACHE INTERNAL "CU Var")
endif()
ENDMACRO()
#
# CU_SET_PATH
#
MACRO(CU_SET_PATH name val)
CU_SET_CACHE(${name} ${val})
CU_ADD_INC_PATH(${val})
ENDMACRO()
#
# CU_ADD_INC_PATH
#
MACRO(CU_ADD_INC_PATH val)
if (";${CU_INC_PATHS};" MATCHES ";${val};")
# nothing to do for now
else()
set(CU_INC_PATHS
${CU_INC_PATHS}
${val}
)
#update cache
CU_SET_CACHE("CU_INC_PATHS" "${CU_INC_PATHS}")
include_directories(${val})
endif()
ENDMACRO()
#
# CU_LOAD_INC_PATHS
#
MACRO(CU_LOAD_INC_PATHS)
include_directories(${CU_INC_PATHS})
ENDMACRO()
#
# CU_SET_PARENT
#
MACRO(CU_SET_PARENT name val)
set(${name} ${val} PARENT_SCOPE)
ENDMACRO()
MACRO(CU_ADD_HOOK hook_name value)
CU_ADD_GLOBAL(${hook_name} "${value}")
ENDMACRO()
MACRO(CU_RUN_HOOK hook_name)
CU_GET_GLOBAL(${hook_name})
message(STATUS "Running cmake hook: ${hook_name}")
if (${hook_name})
set(HOOK_ARRAY ${${hook_name}})
FOREACH (hook_file ${HOOK_ARRAY})
message("Including ${hook_file}")
include("${hook_file}")
ENDFOREACH()
else()
message(STATUS "No hooks registered for ${hook_name}")
endif()
ENDMACRO()