GithubHelp home page GithubHelp logo

Comments (5)

dcarrillo avatar dcarrillo commented on September 7, 2024

Hi, Thank you for using this project.

I not sure why you can't build the docker image locally, but you can use the official docker image from dockerhub (linux/amd64) as explained here

Regards.

from whatismyip.

Waldorf3 avatar Waldorf3 commented on September 7, 2024

Very cool, cheers.

I kinda saw the image on docker hub, but without explanation. So looking at

docker run --tty --interactive --rm \
    -v $PWD/<path to city database>:/tmp/GeoIP2-City-Test.mmdb:ro \
    -v $PWD/<path to ASN database>:/tmp/GeoLite2-ASN-Test.mmdb:ro -p 8080:8080 \
    dcarrillo/whatismyip:latest \
      -geoip2-city /tmp/GeoIP2-City-Test.mmdb \
      -geoip2-asn /tmp/GeoLite2-ASN-Test.mmdb
  1. Where can I find the databases?
  2. I don't really understand the last two lines, are they environment variables or something?

from whatismyip.

dcarrillo avatar dcarrillo commented on September 7, 2024

The databases, as explained in the documentation, can be downloaded from MaxMind. For testing purposes, you can use the ones located in the test directory (these databases contain a minimal set of data).

The last two lines set the minimal parameters you need to pass for the service to work, which are the database paths.

from whatismyip.

juanrodgil avatar juanrodgil commented on September 7, 2024

Could be cool to add the posibility to configure the geoip locations and the template with enviroments variables, so it could be used with docker-compose.

Something like this

version: '3.5'

services:

  geoipupdate:
    container_name: geoipupdate
    image: ghcr.io/maxmind/geoipupdate
    restart: unless-stopped
    environment:
      - GEOIPUPDATE_ACCOUNT_ID=######
      - GEOIPUPDATE_LICENSE_KEY=###################
      - 'GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-City GeoLite2-Country'
      - GEOIPUPDATE_FREQUENCY=72
    volumes:
      - ${CONFIG_PATH}/geoipupdate:/usr/share/GeoIP
    networks:
      - default

  whatismyip:
    container_name: whatismyip
    image: dcarrillo/whatismyip
    restart: unless-stopped
    environment:
      - geoip2-city=/usr/share/GeoIP/GeoLite2-City.mmdb
      - geoip2-asn=/usr/share/GeoIP/GeoLite2-ASN.mmdb
    ports:
      - 84:8080
    volumes:
      - ${CONFIG_PATH}/geoipupdate:/usr/share/GeoIP:ro
    networks:
      - default

networks:
  default:
    driver: bridge

from whatismyip.

dcarrillo avatar dcarrillo commented on September 7, 2024

Hi, this is a closed issue, if you have any other question please open a new one.

Regarding your suggestion, indeed, having ENVARS could be a good idea, in the meantime, you can always add a command configuration to your docker compose file.

from whatismyip.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.