Using geo ip database directly from openpanel service
(Creating this issue to continue conversation via Discord.)
Instead of having a dedicated container geoip-api for ip geolocation, we can just download the MaxMind database (.mmdb), and use their NodeJS library to do geolocation.
Pros:
- No extra container (
geoip-apiis another Debian container) - Free up system utilization and reduce system requirements (less RAM usage, as the
geoip-apiis running a java web server) - The database is considerably lightweight at ~60MB (probably can be included when building image, via Dockerfile)
Cons:
- ?
Cons:
- To update the DB you will need to rebuild
- Self-hosted is only published 3-4 months windows, so it will take awhile until they have up to date DB.
But go ahead with this, might be nice to have this. If we do this I would want it in packages/geo and then imported in apps/api(if we ever need it somewhere else).
thanks, and you are right about updating DB will need to rebuild the service i will see around if people already figured out a way to do db update on the fly, but this will just be a nice to have if i managed to find it for the PR