Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meetuparchive/maxmind-updater
maxmind geoipupdate docker container
https://github.com/meetuparchive/maxmind-updater
geoip github github-actions maxmind
Last synced: 2 months ago
JSON representation
maxmind geoipupdate docker container
- Host: GitHub
- URL: https://github.com/meetuparchive/maxmind-updater
- Owner: meetuparchive
- Archived: true
- Created: 2019-08-19T02:14:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-28T02:25:43.000Z (over 5 years ago)
- Last Synced: 2024-08-06T10:12:38.641Z (5 months ago)
- Topics: geoip, github, github-actions, maxmind
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actions - Update Maxmind Databases
README
# maxmind updater [![](https://github.com/meetup/maxmind-updater/workflows/Main/badge.svg)](https://github.com/meetup/maxmind-updater/actions)
> updates [legacy Maxmind geoip databases](https://dev.maxmind.com/geoip/legacy/downloadable/)
> **⚠️ Note:** To use this action, you must have access to the [GitHub Actions](https://github.com/features/actions) feature. GitHub Actions are currently only available in public beta. You can [apply for the GitHub Actions beta here](https://github.com/features/actions/signup/).
## usage
```sh
$ docker build -t meetup/maxmind-updater .
```This image is expected with code mounted to a workdir, as Github Actions does, with
two environment varibles: `DATA_DIR` the directory to locate `GeoIPCity.dat`, and `CONF_DIR` to location `GeoIp.conf`. These both default to `data` and `conf` respectively.```sh
$ docker run --rm \
-v $(pwd):/code \
-w /code \
-e DATA_DIR:path/to/data \
-e CONF_DIR:path/to/conf \
meetup/maxmind-updater
👍 GeoIP Database up to date, no action needed.
```### Github Actions
Here's how you might run this container in Github Actions on a cron schedule
```yaml
name: GeoIp Update# https://help.github.com/en/articles/events-that-trigger-workflows#scheduled-events
on:
schedule:
- cron: '*/30 * * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Test
uses: docker://meetup/maxmind-updater:{docker-tag}
env:
DATA_DIR: path/to/data
CONF_DIR: path/to/conf
- name: Diff
run: git status
```## references
* [geoipupdate tool](https://github.com/maxmind/geoipupdate-legacy)