mangos/contrib/docker/build.sh
andybe c4095615b6
docker contribution for linux (#153)
* initial review for docker

* update link

* more typos

* hight letter

* it's realm.rft

* realm.rtf

* remove legacy code from dockerfiles

* docker-compose cleanup,- documented clone the right database

* add timezone to mangos.env

* add more at the build command

* double only

* it's a script not a container

* more documentation and moved into seperate folder

* revert back the openssl

* reformat documentation

* high letter

* timezone

* reduce dockerfiles and add documentation

* removed mangos user from build script

* correct links for realmd and world

* fixing small things, after railroid the documentation.

* command is called restart

* hold the documentation line

* add the changes for realmlist.wtf

Co-authored-by: AndyBe <andreas.benzler@gmail.com>
2021-05-09 21:11:05 +01:00

45 lines
997 B
Bash
Executable File

#!/bin/bash
CMAKE_COMMANDS='-DCMAKE_INSTALL_PREFIX=/app -DCONF_INSTALL_DIR=/app/etc -DBUILD_EXTRACTORS=ON -DBUILD_PLAYERBOT=ON'
# container application
if [ ! -d "app/bin" ]; then
mkdir -p app/bin
fi
# needed for mangos container - from docker-compose build
if [ ! -f "app/bin/mangosd-entrypoint.sh" ]; then
cp mangos/contrib/docker/world/mangosd-entrypoint.sh app/bin/mangosd-entrypoint.sh
fi
# docker env
if [ ! -f "mangos.env" ]; then
cp mangos/contrib/docker/mangos.env .
fi
# the compose file for all 3 containers (db /realm /world)
if [ ! -f "docker-compose.yml" ]; then
cp mangos/contrib/docker/docker-compose.yml .
fi
# update git source
if [ -d "mangos" ]; then
cd mangos
git pull
cd ..
fi
#create a build directory
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake $CMAKE_COMMANDS ../mangos
# build mangos with all available cores
make -j$(nproc --all)
# install binaries and default configurations into
# /app/bin/{tools}
# /app/etc
make install