2021-04-18 19:54:51 +02:00
2020-12-07 22:46:28 +01:00
2021-04-18 19:54:51 +02:00
2021-04-18 19:54:51 +02:00

Eressea Docker

This Docker image will provide a full Eressea installation to host an own game. More details about Eressea find on

  • their homepage
  • in wiki you find the game rules and a lot of other information
  • and finally the source code, which is hosted on GitHub

The Dockerfile is available on

Volumes

By default, the image expects a single volume, located at /data. It will hold

  • configuration files
  • log files
  • e-mail
  • game data
  • game data backups

General

This image provides a command line interface. To see all possible commands, run the help command:

docker run -it --rm \
    -v /path/to/my/local/eressea/folder:/data \
    jacsid/eressea help

Initial setup

Initiailze volume

The empty /data volume needs to be initialzed. Without this step, none of the provided commands will work.

First, it is necessary to create the ini files:

docker run -it --rm \
    -v /path/to/my/local/eressea/folder:/data \
    jacsid/eressea generate -i \
    --game_name=MyOwnEressea \
    --rules=e3 \
    --from=gameserver@myhoster.com \
    --realname="MyOwnEressea\ Game\ Server" \
    --imap_server=imap.myhoster.com \
    --imap_user=imapuser \
    --imap_pass=imappwd \
    --imap_port=993 \
    --smtp_server=smtp.myhoster.com \
    --smtp_user=smtpuser \
    --smtp_pass=smtppwd \
    --smtp_port=587

To get further details, call generate command with option -h

Afterwards, create the relevant game folders:

docker run -it --rm \
    -v /path/to/my/local/eressea/folder:/data \
    jacsid/eressea generate -g

It is possible to combine both steps into one call by combining options -i and -g.

Initialize game

Now in /data/game-1 a file called newfactions is available. Enter all players who will join the game. Each player goes into a seperate line:

test.player@hotmail.com elf de
seppl@gmx.at orc en
[...]

The entries, separated by one white space character, are email, race, and language. The language is either "de" for German or "en" for English. This file is read automatically when the game editor starts (see also GM-Guide on Eressea GitHub wiki).

Now create the game map and seed the new players.

docker run -it --rm \
    -v /path/to/my/local/eressea/folder:/data \
    jacsid/eressea map -n -w 50 -e 50 -s

This command will create a new 50x50 map (option -n, -w, -e). In general, the map command opens the game map editor. With the option -s it will automatically be saved, when you exit the editor with key Q. On the game map, seed all new players via key s. To see where other players are located, press h followed by p.

Send first game reports

After players were seeded to the map, run the first game turn which sends the intial reports to the players.

docker run -it --rm \
    -v /path/to/my/local/eressea/folder:/data \
    jacsid/eressea run

Day by day use

The players send their turn commands via email (see initialize chapter above). Use the command mail to process incoming e-mails.

Please note, that only Eressea mails are processed, all other e-mails are deleted from server!

You maybe want to fetch e-mails (option -f) during the day and once a night you check the new game orders (option -c). But it is also possible to combine the options in one call. Use e.g. cron to automatize the calls.

docker run -it --rm \
    -v /path/to/my/local/eressea/folder:/data \
    jacsid/eressea mail -f -c

And somewhen the next game turn is processed with command run:

docker run -it --rm \
    -v /path/to/my/local/eressea/folder:/data \
    jacsid/eressea run

Update Docker image

It's easy to update to the newest Docker image. Execute following command:

docker image pull jacsid/eressea:latest

Afterwards start the above described commands as usual.

Correction of game data

Sometimes there are bugs in the server program where you have to correct game data manually. Find next some samples how to archive this.

Sample session

Set hebs which can be found by units of a region where a specific unit is, to h2.

sudo docker run -it --rm -v /path/to/my/local/eressea/folder:/data jacsid/eressea bash  

./eressea

require 'config'
eressea.read_game('18.dat')
u = get_unit('xdyv')
r = u.region
r.herb = "h2"
eressea.write_game('18.dat')

print(u:show())
Description
Docker image which provides a full Eressea installation to host a local game.
Readme 41 KiB
Languages
Shell 77.2%
Dockerfile 18.2%
Lua 4.6%