mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,6 +12,9 @@ modules/*
|
||||
!modules/*.sh
|
||||
build*/
|
||||
var/*
|
||||
docker/build/cache
|
||||
docker/authserver/bin
|
||||
docker/worldserver/bin
|
||||
docker/authserver/etc/authserver.conf
|
||||
docker/worldserver/etc/worldserver.conf
|
||||
docker/authserver/logs/
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
docker build -t azerothcore/build -f docker/build/Dockerfile .
|
||||
docker build -t acbuild -f docker/build/Dockerfile .
|
||||
|
||||
docker run \
|
||||
-v /$(pwd)/docker/build/cache:/azerothcore/build \
|
||||
-v /$(pwd)/docker/worldserver/bin:/binworldserver \
|
||||
-v /$(pwd)/docker/authserver/bin:/binauthserver \
|
||||
acbuild
|
||||
|
||||
10
bin/acore-docker-remove-build-cache
Normal file
10
bin/acore-docker-remove-build-cache
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo rm -rf ./docker/build/cache/CMakeFiles
|
||||
sudo rm -rf ./docker/build/cache/deps
|
||||
sudo rm -rf ./docker/build/cache/src
|
||||
sudo rm ./docker/build/cache/*.cmake
|
||||
sudo rm ./docker/build/cache/*.txt
|
||||
sudo rm ./docker/build/cache/*.h
|
||||
sudo rm ./docker/build/cache/*.cpp
|
||||
sudo rm ./docker/build/cache/Makefile
|
||||
@@ -26,6 +26,9 @@ services:
|
||||
ports:
|
||||
- ${WORLD_EXTERNAL_PORT:-8085}:8085
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./docker/worldserver/bin
|
||||
target: /azeroth-server/bin
|
||||
- type: bind
|
||||
source: ${WORLDSERVER_ETC:-./docker/worldserver/etc}
|
||||
target: /azeroth-server/etc
|
||||
@@ -48,6 +51,9 @@ services:
|
||||
ports:
|
||||
- ${AUTH_EXTERNAL_PORT:-3724}:3724
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./docker/authserver/bin
|
||||
target: /azeroth-server/bin
|
||||
- type: bind
|
||||
source: ${AUTHSERVER_ETC:-./docker/authserver/etc}
|
||||
target: /azeroth-server/etc
|
||||
|
||||
@@ -24,11 +24,11 @@ You have to follow these steps (**respecting the order**):
|
||||
|
||||
2) Launch one instance of the [AzerothCore Dockerized Database](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/database)
|
||||
|
||||
3) Create an image of the [AzerothCore Dockerized Build](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/build)
|
||||
3) Build AzerothCore using [AzerothCore Dockerized Build](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/build)
|
||||
|
||||
4) Launch one instance of the [AzerothCore Dockerized Authserver](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/authserver)
|
||||
|
||||
5) Launch one instance of the [AzerothCore Dockerized Worldserver](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/worldserver)
|
||||
5) Launch one instance of the [AzerothCore Dockerized Worldserver](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/worldserver)
|
||||
|
||||
|
||||
### Memory usage
|
||||
|
||||
@@ -2,6 +2,4 @@ FROM ubuntu:bionic
|
||||
|
||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev;
|
||||
|
||||
COPY --from=azerothcore/build:latest /azeroth-server/bin /azeroth-server/bin
|
||||
|
||||
CMD ["/azeroth-server/bin/authserver"]
|
||||
|
||||
@@ -28,6 +28,7 @@ docker build -t azerothcore/authserver -f docker/authserver/Dockerfile docker/au
|
||||
|
||||
```
|
||||
docker run --name ac-authserver \
|
||||
--mount type=bind,source="$(pwd)"/docker/authserver/bin/,target=/azeroth-server/bin \
|
||||
--mount type=bind,source="$(pwd)"/docker/authserver/etc/,target=/azeroth-server/etc \
|
||||
--mount type=bind,source="$(pwd)"/docker/authserver/logs/,target=/azeroth-server/logs \
|
||||
-p 127.0.0.1:3724:3724 \
|
||||
|
||||
0
docker/authserver/bin/.gitkeep
Normal file
0
docker/authserver/bin/.gitkeep
Normal file
@@ -8,10 +8,10 @@ ADD conf/config.cmake.dist /azerothcore/conf/config.cmake.dist
|
||||
ADD src /azerothcore/src
|
||||
ADD CMakeLists.txt /azerothcore/CMakeLists.txt
|
||||
|
||||
RUN cd azerothcore; \
|
||||
mkdir build; \
|
||||
cd build; \
|
||||
cmake ../ -DCMAKE_INSTALL_PREFIX=/azeroth-server -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=1; \
|
||||
MTHREADS=`grep -c ^processor /proc/cpuinfo`; MTHREADS=$(($MTHREADS + 2)); \
|
||||
make -j $MTHREADS; \
|
||||
make install -j $MTHREADS;
|
||||
ENTRYPOINT cd azerothcore/build && \
|
||||
cmake ../ -DCMAKE_INSTALL_PREFIX=/azeroth-server -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=1 && \
|
||||
MTHREADS=`grep -c ^processor /proc/cpuinfo`; MTHREADS=$(($MTHREADS + 2)) && \
|
||||
make -j $MTHREADS && \
|
||||
make install -j $MTHREADS && \
|
||||
cp /azeroth-server/bin/worldserver /binworldserver && \
|
||||
cp /azeroth-server/bin/authserver /binauthserver
|
||||
|
||||
@@ -1,15 +1,35 @@
|
||||
# AzerothCore Dockerized Build
|
||||
|
||||
The AzerothCore Build Dockerfile is not meant to create containers, it is a stage that both the [authserver](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/authserver) and the [worldserver](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/worldserver) docker images will use.
|
||||
The AzerothCore Build Dockerfile will create a container that will run the AC build.
|
||||
|
||||
Note: every time you update your AzerothCore sources, you **must** build again this image and the authserver & worldserver images to get the new version on your docker containers.
|
||||
When this container runs, it will compile AC and generate:
|
||||
|
||||
*For more information about Docker multi-stage builds, refer to the [docker multi-stage builds doc](https://docs.docker.com/develop/develop-images/multistage-build/).*
|
||||
- the build cache in the `docker/build/cache` directory
|
||||
- the `worldserver` executable file in `docker/worldserver/bin`
|
||||
- the `authserver` executable file in `docker/authserver/bin`
|
||||
|
||||
# Usage
|
||||
The executable files will be used by the [authserver](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/authserver) and the [worldserver](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/worldserver) docker containers.
|
||||
|
||||
To build the container image you have to be in the **main** folder of your local AzerothCore sources directory.
|
||||
Note: every time you update your AzerothCore sources, you **must** run again the build container and restart your `worldserver` and `authserver` containers.
|
||||
|
||||
## Usage
|
||||
|
||||
To build the container image you have to be in the **main** folder of your local AzerothCore sources directory and run:
|
||||
|
||||
```
|
||||
docker build -t azerothcore/build -f docker/build/Dockerfile .
|
||||
docker build -t acbuild -f docker/build/Dockerfile .
|
||||
```
|
||||
|
||||
Then you can launch the container to rebuild AC using:
|
||||
|
||||
```
|
||||
docker run \
|
||||
-v /$(pwd)/docker/build/cache:/azerothcore/build \
|
||||
-v /$(pwd)/docker/worldserver/bin:/binworldserver \
|
||||
-v /$(pwd)/docker/authserver/bin:/binauthserver \
|
||||
acbuild
|
||||
```
|
||||
|
||||
### Clearing the cache
|
||||
|
||||
To clear the build cache, delete all files contained under the `docker/build/cache` directory.
|
||||
|
||||
0
docker/build/cache/.gitkeep
vendored
Normal file
0
docker/build/cache/.gitkeep
vendored
Normal file
@@ -2,6 +2,4 @@ FROM ubuntu:bionic
|
||||
|
||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev libreadline-dev;
|
||||
|
||||
COPY --from=azerothcore/build:latest /azeroth-server/bin /azeroth-server/bin
|
||||
|
||||
CMD ["/azeroth-server/bin/worldserver"]
|
||||
|
||||
@@ -8,7 +8,7 @@ If you just want to install the whole AzerothCore quickly using Docker Compose,
|
||||
|
||||
- You need to have [Docker](https://docs.docker.com/install/) installed in your system. You can install it on any operating system.
|
||||
|
||||
- You need to first build the [AzerothCore Build Image](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/build).
|
||||
- You need to first build AzerothCore using the [AzerothCore Dockerized Build](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/build).
|
||||
|
||||
- If you haven't created a docker network yet, create it by simply using `docker network create ac-network`.
|
||||
|
||||
@@ -31,6 +31,7 @@ Replace `/path/to/your/data` with the path of where your data folder is.
|
||||
```
|
||||
docker run --name ac-worldserver \
|
||||
--mount type=bind,source=/path/to/your/data,target=/azeroth-server/data \
|
||||
--mount type=bind,source="$(pwd)"/docker/worldserver/bin/,target=/azeroth-server/bin \
|
||||
--mount type=bind,source="$(pwd)"/docker/worldserver/etc/,target=/azeroth-server/etc \
|
||||
--mount type=bind,source="$(pwd)"/docker/worldserver/logs/,target=/azeroth-server/logs \
|
||||
-p 127.0.0.1:8085:8085 \
|
||||
|
||||
0
docker/worldserver/bin/.gitkeep
Normal file
0
docker/worldserver/bin/.gitkeep
Normal file
Reference in New Issue
Block a user