https://github.com/a0s/suricate
Simple interface to MaxMind GeoLite2 database
https://github.com/a0s/suricate
Last synced: about 2 months ago
JSON representation
Simple interface to MaxMind GeoLite2 database
- Host: GitHub
- URL: https://github.com/a0s/suricate
- Owner: a0s
- Created: 2017-05-25T09:27:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T05:39:01.000Z (over 3 years ago)
- Last Synced: 2025-01-06T02:12:10.448Z (over 1 year ago)
- Language: Ruby
- Size: 23.4 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Suricate
========
The simple REST API to MaxMind City database
```shell script
curl -s "localhost:3000/lookup?ip=36.89.229.97&language=en" | jq ruby-2.7.1@suricate
{
"country": "Indonesia",
"country_iso_code": "ID",
"city": "Tangerang",
"lat": -6.177,
"long": 106.6284
}
curl -s "localhost:3000/health"
OK
```
Docker
------
You need fresh GeoLite2-City.mmdb from [MaxMind site](https://dev.maxmind.com/geoip/geoip2/geolite2/)
```shell script
docker build . --tag suricate
docker run -it --name suricate \
-v ~/GeoLite2-City.mmdb:/app/maxminddb/GeoLite2-City.mmdb \
-p 3000:3000 \
suricate
```
Get console
```shell script
docker exec -it suricate rake c
```