Service that allows to detect a user location based on it's ip. Currently, is only integrated with ipstack.
An example usage:
curl "https://test.website/location" -H "X-Real-IP: 127.0.0.1" -v
< HTTP/1.1 200
< Content-Type: application/json
<
{
"country": {
"code": "DE",
"name": "Germany"
},
"city": "Dusseldorf"
}
The basic run example:
docker run -d -e ALLOWED_ORIGINS=https://test.website \
-e INTEGRATION_IPSTACK_URL=https://api.ipstack.com \
-e INTEGRATION_IPSTACK_ACCESS_KEY=723953e7b0e27c762c38213b7c71fd77 \
-e SERVER_PORT=8080 \
-p 8080:8080 \
wilddev/geo:latest
Deploy it in a Swarm:
version: "3.9"
services:
geo:
image: wilddev/geo:latest
restart: unless-stopped
environment:
- ALLOWED_ORIGINS=https://test.website
- INTEGRATION_IPSTACK_URL=https://api.ipstack.com
- INTEGRATION_IPSTACK_ACCESS_KEY=723953e7b0e27c762c38213b7c71fd77
ports:
- "8080:8080"
networks:
overlay:
aliases:
- geo
Available settings list and their default values:
JAVA_OPTS=-Xmx256M
ALLOWED_ORIGINS=http://localhost
SERVER_PORT=8080
INTEGRATION_IPSTACK_URL=http://api.ipstack.com
INTEGRATION_IPSTACK_ACCESS_KEY=ninja
Sign up for ipstack (you need to pick a plan).
Content type
Image
Digest
sha256:13c0a5c2d…
Size
80.5 MB
Last updated
over 1 year ago
docker pull wilddev/geo