You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-8Lines changed: 34 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,8 +87,6 @@ If you wish to expose the system without a reverse proxy, you may wish to update
87
87
88
88
`API_KEY` allows a very basic protection of the system to be applied, a header named `API-KEY`*(hyphen not underscore!)* with a matching value must be passed if this variable is populated. If left blank, the API is open.
89
89
90
-
`LOAD_LOG_FREQ` allows adjusting how frequently progress in saving records will be logged.
91
-
92
90
`COUNTRY`, `CITY` and `ASN` are the databases that will be loaded. **If you don't need cities or ASNs, just leave them blank.** The values / names used should mirror the directory values found in the [ip-location-db](https://github.com/sapics/ip-location-db) project:
93
91
94
92
### Allowed `COUNTRY` values
@@ -115,6 +113,8 @@ If you wish to expose the system without a reverse proxy, you may wish to update
115
113
116
114
`UPDATE_TIME` is optional, but if present *(and in standard HH:MM format)*, it will check for / download / reload new data every 24 hours at the time specified.
117
115
116
+
`LOAD_LOG_FREQ` is optional, but if present allows adjusting how frequently load progress is logged. Defaults to 1000.
117
+
118
118
### MMDB
119
119
120
120
The MMDB adaption doesn't need any initialisation, it just needs to be told to use that format:
@@ -263,24 +263,50 @@ More interestingly, for a single IP, `/benchmark/{ipVersion}/1`:
263
263
264
264
**1000μs is still only 0.001 seconds, so all are acceptably quick.**
265
265
266
+
## Building
267
+
268
+
The tool can be built for all architectures using the command:
269
+
270
+
```Shell
271
+
make build
272
+
```
273
+
274
+
Or specific platforms using more specific commands:
275
+
276
+
```Shell
277
+
make build_linux
278
+
make build_darwin
279
+
make build_windows
280
+
```
281
+
282
+
Or specific platforms and architectures using even more specific commands:
283
+
284
+
```Shell
285
+
make build_linux_x64
286
+
make build_linux_arm64
287
+
make build_darwin_x64
288
+
make build_darwin_arm64
289
+
make build_windows_x64
290
+
make build_windows_arm64
291
+
```
292
+
266
293
## Docker
267
294
268
-
There is a Dockerfile included that supports building a docker container image, `ip-location-api`.
269
-
This can be built by running `make dockerbuild`.
270
-
By default, this uses the `mmdb` data storage, and open data that doesn't require a license:
295
+
There is a Dockerfile included that supports building a docker container image, `ip-location-api`. This can be built by running `make dockerbuild`. By default, this uses the `mmdb` data storage, and open data that doesn't require a licence:
271
296
272
297
*`COUNTRY` defaults to `geo-whois-asn-country`
273
298
*`CITY` defaults to blank
274
299
*`ASN` defaults to `asn`
275
300
276
-
To run the docker image, map port 8080 to the desired port, and pass the configuration variables on the commandline.
277
-
For example, to serve on port 8454, using a sqlite database, with the dbip data for country and ask but geolite2 for city, run:
301
+
To run the docker image, map port 8080 to the desired port, and pass in any configuration variables. For example, to serve on port 8454, using an SQLite database, with the `dbip` data for country and ASN, but `geolite2` for city, run:
0 commit comments