Skip to main content
The gateway turns a truncated client address into a country code with a local copy of DB-IP’s “IP to Country Lite” file (CC BY 4.0, attribution required). DB-IP publishes one file per month. The file is baked into the gateway image; the image names the month it carries (/geo/dbip-country-lite.mmdb.month). Details and the licence terms: ../reference/geo.md. Alert: DBIPFileOld fires when the file in use was built more than 45 days ago (alerts.md). Do the update every month, early in the month once DB-IP has published.

Steps

  1. Fetch and check the new file locally:
    Expected:
    Before DB-IP has published the month, curl reports 404 and the target fails; nothing is written. Never take another month silently: pass the previous month explicitly if you must.
  2. Run the geo tests against it (they fail if the truncation error rate rises above 0.5%):
    Expected: ok github.com/justmert/veristar/internal/gateway.
  3. Build the release with the new month. release-images.yml builds the gateway with DBIP_MONTH set to the month of the release tag’s commit date, so a release tagged on a commit from this month carries this month’s file. Tag a platform release after DB-IP has published, and roll it out:
    For a local or test image, docker build -f deploy/images/gateway.Dockerfile --build-arg DBIP_MONTH=<YYYY-MM> . (or make gateway-up, which passes the current month).
  4. Check a node serves the new month: DBIPFileOld resolves, and the gateway metric gateway_geo_build_timestamp_seconds shows the new build time in Prometheus.
  5. Attribution stays as it is: the image ships DBIP-ATTRIBUTION.txt next to the file, and the console and docs carry the DB-IP link (../reference/geo.md).
A running gateway can also load a replaced file without restart on SIGHUP (the file is replaced by renaming over the old one; if the new file does not open, the error is logged and the old one stays). The production images do not mount the file from the host, so the release path above is the normal one.

Exercised

Not yet exercised: step 3 through the release workflow (GitHub Actions fails at start-up on the account) and step 4 on a deployed node.