sptrakesh/mmdb-ws

By sptrakesh

Updated 5 days ago

DB IP database lookup websocket server

Image
Languages & Frameworks
0

3.8K

DB IP IP address lookup service. Project sources on github

Running

Download the current DB IP file from the link above to a desired location. The file needs to be mounted (can be read-only) when running the container. The following shows an example of running the container with the file (2020-05 in example) downloaded to a mmdb directory under your current working directory.

docker run -d --rm \
  -v $PWD/mmdb/dbip-city-lite-2020-05.mmdb.gz:/opt/spt/data/dbip.mmdb.gz:ro \
  -p 8010:8010 \
  --name mmdb-ws sptrakesh/mmdb-ws

Running on different port

If you wish to run the service on a different port (default 8010), specify a PORT environment variable when starting the container. The following example illustrates running the service on port 8000.

docker run -d --rm \
  -v $PWD/mmdb/dbip-city-lite-2020-05.mmdb.gz:/opt/spt/data/dbip.mmdb.gz:ro \
  -p 8000:8000 \
  -e PORT=8000 \
  --name mmdb-ws sptrakesh/mmdb-ws

Controlling number of threads

The container will start up with 8 I/O threads. You can control the number of threads the service uses via a THREADS environment variable. The following illustrates running the service with 32 threads.

docker run -d --rm \
  -v $PWD/mmdb/dbip-city-lite-2020-05.mmdb.gz:/opt/spt/data/dbip.mmdb.gz:ro \
  -p 8010:8010 \
  -e THREADS=32 \
  --name mmdb-ws sptrakesh/mmdb-ws

Docker Pull Command

docker pull sptrakesh/mmdb-ws