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

View File

@@ -139,62 +139,39 @@ jobs:
name: windows-2019-MSVC16-release
path: build/bin/Release
docker-build:
docker-build-n-deploy:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
env:
DOCKER_EXTENDS_BIND: abstract-no-bind
DOCKER_BUILD_WORLD_TARGET: worldserver
DOCKER_BUILD_AUTH_TARGET: authserver
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
#env:
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
run: |
./bin/acore-docker-build-no-scripts
docker-compose --profile all build
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Deploy
#env:
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
if: ${{ steps.extract_branch.outputs.branch == 'master' }}
run: |
docker-compose --profile all push
docker-worldserver:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/worldserver -f docker/worldserver/Dockerfile docker/worldserver
docker-authserver:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/authserver -f docker/authserver/Dockerfile docker/authserver
docker-database:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/database -f docker/database/Dockerfile .