milesmcc / shynet

Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.
Apache License 2.0
2.89k stars 183 forks source link

Automatically update geoip database #242

Open cmj2002 opened 1 year ago

cmj2002 commented 1 year ago

Currently, the geoip database is only updated when there is a new release, but outdated geoip data will lead to some mistakes in identifying countries, especially when there is no new release for a long time.

Maybe we can provide an environment variable to use the user's maxmind license_key to automatically update the geoip library on a regular basis? For users who do not care about the accuracy of the country, they can use the database in the docker by setting the environment variable to empty string.

If this is difficult to implement, you can also schedule a cronjob on the host which use docker exec to update it. This is what I do now. This requires additionally installing curl in the container.

milesmcc commented 1 year ago

Yeah we could definitely do something like this, though tbh I think the better solution is honestly to just release more frequently.

milesmcc commented 1 year ago

(And that's on me!)