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
Dockerfile
for 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.yml
for 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/config
folder - Added
prep-docker.sh
andstart-docker.sh
for 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.py
now also change the ones inprivex.helpers.settings
so that redis env vars configure the privex-helpers' cache abstraction - The heart of
core.get_rdns
was refactored intoget_rdns_base
, whileget_rdns
calls it, and is wrapped byr_cache
for transparent caching via the selected privex-helpers' cache abstraction adapter app.get_geodata
now usescore.get_cache
(wrapper for privex-helpers' adapter_get and adapter_set) instead ofget_redis
core.get_redis
has 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 install
was taking a very long time. - Improved
example.env
including adding more example ENV variables - Improved
.gitignore
- Updated shebang in
run.sh
to use/usr/bin/env bash
instead of just/bin/bash
- Updated
update_geoip.sh
with 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
geoipupdate
tool, 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
None
so it doesn't interfere withAccepts
header - refactored body of
tpl_add_hosts
into_tpl_add_hosts
so that it can be called independently without going via the context processing engine - changed
wants_type
defaultfmt
from'html'
to''
(empty string), so that it doesn't interfere with MIME detection viaAccepts
header - added some more debugging statements across the project, inc. wants_type
- fixed
FILTER_HOSTS
handling in _tpl_add_hosts, so that trusted_hosts can actually be disabled - changed
main_host
references inapi.md
tohost
- so that it shows URLs based on which domain you're accessing the docs from. - added Quickstart section to
api.md
which contains all important API queries via curl for easy copy pasting - symlinked wsgi.py into myip/ to help with referencing it
- added
__main__.py
tomyip
so the app can be ran in development usingpython3 -m myip
- made
wsgi.py
,__main__.py
, andapp.py
executable, so they can simply be executed on nix systems to start the flask dev server - probably some other minor fixes I forgot