This is a docker container for running the D2MapAPI project on Linux.
Download the repo and build the container:
docker build -t d2mapapi https://github.com/RulerOf/d2mapapi-docker.git
Then supply a copy of Diablo II 1.13c as a bind mount at /game
inside of the container when you run it.
For example, if you have a copy of D2 at /srv/d2
:
docker run -d --rm -v /srv/d2:/game --name d2mapapi d2mapapi:latest
Again, assuming you have a copy of d2 at /srv/d2
, create your compose file:
version: "3.3"
services:
d2mapapi:
build: https://github.com/RulerOf/d2mapapi-docker.git
volumes:
- /srv/d2:/game
Then build and start your container:
docker-compose up -d --build
This container uses the excellent s6 overlay to manage the filesystem and processes. The healthcheck script runs every 30 seconds. It selects a random map seed queries the API for the map data for 5 random areas from that seed. If any of the steps fail, the healthcheck script will restart the d2mapapi server.