Skip to content

v0.4.2

Choose a tag to compare

@Uaghazade1 Uaghazade1 released this 15 Aug 06:50
· 23 commits to main since this release

Coolify only. Your visitors get a country now. Redeploy from the platform and
the first deploy downloads a geo database. The images are byte-identical to
v0.4.0 and this tag runs them; an ordinary docker-compose.yml install is
untouched and always had --with-geoip.

What was wrong

Every Coolify install reported a null country for every visitor, on every
plan, forever. The geoip volume started empty, there was no checkout to fill it
from, and GEOIP_DB_PATH was deliberately unset because a path that names no
file is a refusal to start.

Each of those was true. None of them was an acceptable place to leave a
self-hoster. It was written down in two places, and the Coolify half of the
instruction pointed at infra/selfhost/geoip/, a directory that does not exist
on that platform.

What it does now

A geoip one-shot does what fetch-dbip.sh does for a host with a shell: on the
first deploy it downloads DB-IP City Lite, checks the file really is a
MaxMind-format database, and moves it into place. The collector's
GEOIP_DB_PATH now points at it.

The licence is what makes fetching on your behalf possible at all. GeoLite2
needs a MaxMind account and a licence key and forbids redistribution, so nothing
could have fetched it for you. DB-IP City Lite is
CC BY 4.0: a direct download, no
account, with an attribution condition. That condition asks for credit wherever
you show the data:

IP Geolocation by DB-IP, https://db-ip.com, used under
CC BY 4.0.

The step prints it too.

The network is a first-install dependency only. The file is written once and
never rewritten, so every later deploy exits on the first line without touching
the network. To refresh it, delete dbip-city-lite.mmdb from the volume and
redeploy; the databases go stale within a month or two. To use MaxMind instead,
copy your own file in and point GEOIP_DB_PATH at it.

A failed download fails the deploy. The collector reads that path at boot and
refuses to start on a file that is not there, so the alternative is a crash loop
one step further from its cause. Redeploy to retry, or install with no geo by
deleting the service, its depends_on entry and the collector's GEOIP_DB_PATH.
COOLIFY.md says so.

Proven before it shipped

On a real host, with the command rendered exactly as Compose hands it to the
shell: 124 MB written, mode 0444, owned by uid 1000; a second run left it
alone; and the published collector image started against it with geoip_loaded, configured: true.

One thing the host script could not have told us. Its verification is
grep -qa MaxMind.com, which is correct under GNU grep and finds nothing under
busybox. Measured on the real 130 MB database: grep -qa said no,
strings | grep -q said yes. Without catching that, a truncated download would
have been caught one deploy later, by a collector refusing a file it could not
parse.

The install is now thirteen containers

Three of them exited, and that is success: migrate, keygen and geoip are
one-shot steps that do their work and stop.

Images

Ten, published to ghcr.io/openlabs-so/openanalytics and tagged v0.4.2, with
contents unchanged from v0.4.0. The tag moves because the compose file ships
with them and a release is one commit.

Full changelog: v0.4.1...v0.4.2