mangoszero/server — pull request #260 by tazjin (2014-11-02 03:24:12+00:00)
Title: [build] Add Docker files & launch script

(see comment below for more info)

--------------------------------------------

This adds a Dockerfile for automated builds of MangosZero on Docker Hub.

A launch script is included that will fork a realmd into the background
and run mangosd as the foreground process.

Mangos is compiled and installed into `/opt/mangos`. The source is still
present in the `/opt/mangos/src` folder, all binaries are installed in
`/opt/mangos/bin`.

The image expects three possible volumes:

/opt/mangos/etc - Required. Configuration is mounted here

/opt/mangos/data - Required. Maps, DBCs etc. go here (can be mounted
as an empty host folder / data container)

/opt/mangos/wow - Optional, mount a World of Warcraft installation into
this folder and the launch script will extract and assemble necessary
maps, DBCs etc from it.

Using the image is relatively simple. The same container runs realmd and
mangosd, so the most important thing is to forward the container ports
properly.

If you set Mangos to connect to MariaDB / MySQL on `localhost` you also
need to forward the SQL socket into the container.

An example:

docker run --restart="always"
-v /var/lib/mysql/mysql.sock:/var/run/mysqld/mysqld.sock
-v ~/mangosdata:/opt/mangos/data
-v ~/mangosconf:/opt/mangos/etc
--name mangos-server
-p 3724:3724 -p 8085:8085
tazjin/mangoszero