Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.01 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.01 KB

GeoIP2 Database to GCS

This script will:

  • Fetch GeoIP2 database and copy it to GCS
  • Maintains state of version and only updates when new version is available

Requirements

  • GCS Bucket
  • Some scheduler to run script periodicallly

Usage

local

Note

We're managing dependencies with poetry, please install first.

poetry install

export MAXMIND_LICENSE_KEY='license'
export GCS_BUCKET='bucket'

poetry run geoip2gcs

local - docker

geoip2gcs can be executed with docker.

Important

In order for containers to succeed, you additionally need to take care of authenticating the container env with GCP. Please choose one of the existing options to do so.

docker build -t geoip2gcs:latest .

export MAXMIND_LICENSE_KEY='license'
export GCS_BUCKET='bucket'

docker run \
    --rm \
    --name geoip2gcs \
    -e MAXMIND_LICENSE_KEY=$MAXMIND_LICENSE_KEY \
    -e GCS_BUCKET=$GCS_BUCKET \
    geoip2gcs:latest