Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.21 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.21 KB

d2mapapi-docker

This is a docker container for running the D2MapAPI project on Linux.

Usage

Docker Run

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

Docker Compose

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

Notes

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.