mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
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:
@@ -1,12 +1,15 @@
|
||||
function registerHooks() { hwc_event_register_hooks "$@"; }
|
||||
function runHooks() { hwc_event_run_hooks "$@"; }
|
||||
function registerHooks() { acore_event_registerHooks "$@"; }
|
||||
function runHooks() { acore_event_runHooks "$@"; }
|
||||
|
||||
source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
|
||||
|
||||
if [ -f "$AC_PATH_CONF/config.sh" ]; then
|
||||
source "$AC_PATH_CONF/config.sh" # should overwrite previous
|
||||
# first check if it's defined in env, otherwise use the default
|
||||
USER_CONF_PATH=${USER_CONF_PATH:-"$AC_PATH_CONF/config.sh"}
|
||||
|
||||
if [ -f "$USER_CONF_PATH" ]; then
|
||||
source "$USER_CONF_PATH" # should overwrite previous
|
||||
else
|
||||
echo "NOTICE: file <$AC_PATH_CONF/config.sh> has not been found, you should create and configure it."
|
||||
echo "NOTICE: file <$USER_CONF_PATH> has not been found, you should create and configure it."
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -15,7 +18,7 @@ fi
|
||||
|
||||
for entry in "$AC_PATH_MODULES/"*/include.sh
|
||||
do
|
||||
if [ -e "$entry" ]; then
|
||||
if [ -e "$entry" ]; then
|
||||
source "$entry"
|
||||
fi
|
||||
done
|
||||
|
||||
22
apps/bash_shared/deno.sh
Normal file
22
apps/bash_shared/deno.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
DENO_MIN_VERSION="1.7.4"
|
||||
|
||||
function denoInstall() {
|
||||
|
||||
{ # try
|
||||
echo "Deno version check:" && denoCmd upgrade --version $DENO_MIN_VERSION
|
||||
} ||
|
||||
{ # catch
|
||||
echo "Installing Deno..."
|
||||
# just one line of command that works on all OSes
|
||||
# (temporary cd into AC_PATH_DEPS)
|
||||
curl -fsSL https://deno.land/x/install/install.sh | DENO_INSTALL="$AC_PATH_DEPS/deno" sh
|
||||
}
|
||||
}
|
||||
|
||||
function denoCmd() {
|
||||
(cd "$AC_PATH_ROOT" ; ./deps/deno/bin/deno "$@")
|
||||
}
|
||||
|
||||
function denoRunFile() {
|
||||
denoCmd run --allow-all --unstable "$@"
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
[[ ${GUARDYVAR:-} -eq 1 ]] && return || readonly GUARDYVAR=1 # include it once
|
||||
|
||||
# force default language for applications
|
||||
LC_ALL=C
|
||||
LC_ALL=C
|
||||
|
||||
AC_PATH_APPS="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
||||
|
||||
@@ -9,9 +9,13 @@ AC_PATH_SHARED="$AC_PATH_APPS/bash_shared"
|
||||
|
||||
source "$AC_PATH_SHARED/defines.sh"
|
||||
|
||||
source "$AC_PATH_DEPS/hw-core/bash-lib-event/src/hooks.sh"
|
||||
source "$AC_PATH_DEPS/acore/bash-lib/src/event/hooks.sh"
|
||||
|
||||
source "$AC_PATH_SHARED/common.sh"
|
||||
|
||||
source "$AC_PATH_SHARED/deno.sh"
|
||||
|
||||
denoInstall
|
||||
|
||||
[[ "$OSTYPE" = "msys" ]] && AC_BINPATH_FULL="$BINPATH" || AC_BINPATH_FULL="$BINPATH/bin"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user