Skip to content

casantosmu/docker-ip2location-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IP2Location MongoDB Docker Image

This repository contains a Dockerfile and a shell script for setting up an IP2Location MongoDB database. The script downloads the IP2Location database, decompresses it, sets up a MongoDB instance, and imports the data into a collection.

Prerequisites

Before running the project, make sure you have the following:

  • Docker installed on your system.

Usage

Follow the steps below to run the IP2Location MongoDB project:

  1. Pull the Docker image from the GitHub Container Registry:

    docker pull ghcr.io/casantosmu/docker-ip2location-mongodb:main
  2. Build the Docker image locally:

    docker build -t ip2location-mongodb .
  3. Run the Docker container:

    docker run -d --name ip2location-mongodb \
    -e TOKEN=${TOKEN} \
    -e MONGODB_PASSWORD=${MONGODB_PASSWORD} \
    --network ip2location-mongodb \
    ip2location-mongodb

    Make sure to replace ${TOKEN} and ${MONGODB_PASSWORD} with the appropriate values.

  4. Wait for the setup to complete. Once the setup is done, you can use the IP2Location database in your MongoDB instance.

Acknowledgements

About

This project provides a Docker image with MongoDB and IP2Location database setup

Topics

Resources

Stars

Watchers

Forks