Mirror management for OpenMandriva.
This is not a plain file mirror: it is a mirrorbits
redirector backed by a local null-mirror. Clients hitting
mirror.openmandriva.org are redirected (HTTP 302) to a real mirror chosen by
GeoIP/weight.
Everything runs from a single Docker Compose stack:
mirrorbits/docker-compose.yml. Services:
- redis - mirrorbits state store.
- app (mirrorbits) - scans the local repository tree and redirects clients to a
real mirror. Listens on
:8080. - geoipupdate - keeps the MaxMind GeoIP databases up to date (credentials read
from
mirrorbits/.env, see below). - caddy - terminates HTTP/HTTPS (Lets Encrypt) and reverse-proxies to
app:8080. Replaces the former nginx-proxy setup. - cron (null-rsync) - runs
null-rsync.pyevery 2 minutes againstabf.openmandriva.org::openmandriva-full/, recreating the full repository tree under/opt/mirror/repo/openmandriva/as empty (zero-byte) files. mirrorbits scans that tree; the actual file content always lives on the upstream/real mirrors.
The local repository tree is mounted into both app and cron at /srv/repo.
MaxMind credentials are not committed. Create mirrorbits/.env (gitignored):
GEOIPUPDATE_ACCOUNT_ID=<your-account-id>
GEOIPUPDATE_LICENSE_KEY=<your-license-key>
To rotate the key: generate a new license key at https://www.maxmind.com
(My License Keys), update mirrorbits/.env, delete the old key on MaxMind, then
docker compose up -d geoipupdate.
-
Clone this repository into
/opt/mirror. -
Clone https://github.com/etix/mirrorbits/ into
mirrorbits/app. -
Replace
mirrorbits/app/Dockerfilewithmirrorbits/app-sample/Dockerfile. -
Create
mirrorbits/.envwith the MaxMind credentials (see above). -
Verify the repository path in
mirrorbits/docker-compose.yml(the/opt/mirror/repobind mounts) and the settings inmirrorbits/mirrorbits.conf. -
Launch the stack:
cd mirrorbits && docker compose up -d --build