echoip icon indicating copy to clipboard operation
echoip copied to clipboard

Docker compose file

Open ShlomiPorush opened this issue 3 years ago • 5 comments

After I saw that there was no documentation how to run it in docker compose.. So, Enjoy.

version: '3.7'

services:
  echoip:
    image: mpolden/echoip
    command: "-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb"
    ports:
      - 8080:8080
    volumes:
      - ./data:/data:ro
  
  # this container needs to runs only once or whan you want to update Geo databases
  maxmind:
    image: maxmindinc/geoipupdate
    environment:
      - GEOIPUPDATE_ACCOUNT_ID= # get your own account from https://www.maxmind.com/
      - GEOIPUPDATE_LICENSE_KEY= # get your own key from https://www.maxmind.com/
      - GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-City GeoLite2-Country
    volumes:
      - ./data:/usr/share/GeoIP

ShlomiPorush avatar Jul 27 '22 22:07 ShlomiPorush

I have an issue with reverse-proxy and "Host" value behind apache. Header page should display some thing like this: ifconfig.my.domain — What is my IP address? but is displaying "localhost:<port> — What is my IP address?"

I am running echoip with : entrypoint: /opt/echoip/echoip -H X-Forwarded-For and this apache reverse-proxy configuration.

<VirtualHost *:443>
        ServerName ifconfig.my.domain
        ...
	ProxyPass        / http://localhost:8931/ 
        ProxyPassReverse / http://localhost:8931/
        RemoteIPHeader X-Forwarded-For
        ...
</VirtualHost>

mqu avatar Aug 22 '22 06:08 mqu

fixed : need to add : "ProxyPreserveHost On", in Apache reverse-proxy configuration. thanks.

mqu avatar Aug 22 '22 07:08 mqu

-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb

No matter what I do: My compose file: image

But I always get this:

image

afzl-wtu avatar Aug 29 '22 10:08 afzl-wtu

After I saw that there was no documentation how to run it in docker compose.. So, Enjoy.

version: '3.7'

services:
  echoip:
    image: mpolden/echoip
    command: "-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb"
    ports:
      - 8080:8080
    volumes:
      - ./data:/data:ro
  
  # this container needs to runs only once or whan you want to update Geo databases
  maxmind:
    image: maxmindinc/geoipupdate
    environment:
      - GEOIPUPDATE_ACCOUNT_ID= # get your own account from https://www.maxmind.com/
      - GEOIPUPDATE_LICENSE_KEY= # get your own key from https://www.maxmind.com/
      - GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-City GeoLite2-Country
    volumes:
      - ./data:/usr/share/GeoIP

https://github.com/mpolden/echoip/issues/159

afzl-wtu avatar Aug 29 '22 10:08 afzl-wtu

After I saw that there was no documentation how to run it in docker compose.. So, Enjoy.

version: '3.7'

services:
  echoip:
    image: mpolden/echoip
    command: "-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb"
    ports:
      - 8080:8080
    volumes:
      - ./data:/data:ro
  
  # this container needs to runs only once or whan you want to update Geo databases
  maxmind:
    image: maxmindinc/geoipupdate
    environment:
      - GEOIPUPDATE_ACCOUNT_ID= # get your own account from https://www.maxmind.com/
      - GEOIPUPDATE_LICENSE_KEY= # get your own key from https://www.maxmind.com/
      - GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-City GeoLite2-Country
    volumes:
      - ./data:/usr/share/GeoIP

LOL Helped me again. I forgot all about it. AFter one year

afzl-wtu avatar Jul 18 '23 18:07 afzl-wtu