Releases: Privex/whats-my-ip
Releases · Privex/whats-my-ip
v2.3.0 - Docker support + Improved caching + README overhaul + more
v2.3.0 - Docker support + Improved caching
-
Docker Support
- Added
Dockerfilefor building a Docker image (python3.9-alpine based for minimal size) from the project. - Added
example-docker-compose.yml- which is used as a base for the user'sdocker-compose.ymlfor easy management of the app inside of Docker, with Redis linked to it. - Added
dkr/folder to store docker-related files and folders, including various example files indkr/configfolder - Added
prep-docker.shandstart-docker.shfor generating config files from the example files, and easily preparing an environment to use docker-compose - Added
.dockerignore
- Added
-
Improved Caching
- The application is no longer tightly bound to Redis, though it's still recommended. It now uses privex-helpers' Cache Abstraction Layer, which allows the use of Redis, Memcached, SQLite, in-memory cache, or other future adapters.
- The
REDIS_settings insettings.pynow also change the ones inprivex.helpers.settingsso that redis env vars configure the privex-helpers' cache abstraction - The heart of
core.get_rdnswas refactored intoget_rdns_base, whileget_rdnscalls it, and is wrapped byr_cachefor transparent caching via the selected privex-helpers' cache abstraction adapter app.get_geodatanow usescore.get_cache(wrapper for privex-helpers' adapter_get and adapter_set) instead ofget_rediscore.get_redishas been commented out, since it's no longer used
-
Other stuff
- Removed
"full"extra from privex-helpers, and simply added the actual optional extra packages that the project needs by hand, sincepipenv installwas taking a very long time. - Improved
example.envincluding adding more example ENV variables - Improved
.gitignore - Updated shebang in
run.shto use/usr/bin/env bashinstead of just/bin/bash - Updated
update_geoip.shwith PATH, env shebang, overridable env vars, automatic sudo, and now rsync's the DB files from files.privex.io instead of wget'ing from the dead maxmind download URLs.
- Removed
-
Overhauled the README
- Added Table of Contents near the start, thanks to this small web app: https://ecotrust-canada.github.io/markdown-toc/
- Added Features section under first heading, which explains what the index HTML page can do, as well as the various API functionalities
- Updated requirements to confirm py3.8 and 3.9 work great
- Added section for Docker, including running a solo container, and running with docker compose
- Added section on keeping GeoIP2 databases up to date using maxmind's
geoipupdatetool, with detailed instructions on installation and config on ubuntu/debian - Reformatted thanks for reading section, as the line was way too long.
-
Plus probably some other stuff that I've forgot to mention :)
v2.2.0 - many fixes and improvements, especially related to API output type handling
- removed hardcoded host context from view_api_docs so that it uses the flask global template context
- changed default bformat for index to
Noneso it doesn't interfere withAcceptsheader - refactored body of
tpl_add_hostsinto_tpl_add_hostsso that it can be called independently without going via the context processing engine - changed
wants_typedefaultfmtfrom'html'to''(empty string), so that it doesn't interfere with MIME detection viaAcceptsheader - added some more debugging statements across the project, inc. wants_type
- fixed
FILTER_HOSTShandling in _tpl_add_hosts, so that trusted_hosts can actually be disabled - changed
main_hostreferences inapi.mdtohost- so that it shows URLs based on which domain you're accessing the docs from. - added Quickstart section to
api.mdwhich contains all important API queries via curl for easy copy pasting - symlinked wsgi.py into myip/ to help with referencing it
- added
__main__.pytomyipso the app can be ran in development usingpython3 -m myip - made
wsgi.py,__main__.py, andapp.pyexecutable, so they can simply be executed on nix systems to start the flask dev server - probably some other minor fixes I forgot