Skip to content

Commit

Permalink
Merge tag 'v4.8.0' into ubuntu-ppa
Browse files Browse the repository at this point in the history
4.8.0

* The Docker container now supports the following new environment
  variables:

  * `GEOIPUPDATE_CONF_FILE` - The path where the configuration file will
    be written. The default is `/etc/GeoIP.conf`.
  * `GEOIPUPDATE_DB_DIR` - The directory where geoipupdate will download
    the databases. The default is `/usr/share/GeoIP`.

  Pull request by Maxence POULAIN. GitHub #143.
  • Loading branch information
oschwald committed Jul 20, 2021
2 parents 9968ca4 + 0732a36 commit 7ddfff7
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 12 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CHANGELOG

## 4.8.0 (2021-07-20)

* The Docker container now supports the following new environment
variables:

* `GEOIPUPDATE_CONF_FILE` - The path where the configuration file will
be written. The default is `/etc/GeoIP.conf`.
* `GEOIPUPDATE_DB_DIR` - The directory where geoipupdate will download
the databases. The default is `/usr/share/GeoIP`.

Pull request by Maxence POULAIN. GitHub #143.

## 4.7.1 (2021-04-19)

* The Alpine version used for the Docker image now tracks the `alpine:3`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ https://github.com/maxmind/geoipupdate/issues

# Copyright and License

This software is Copyright (c) 2018 - 2020 by MaxMind, Inc.
This software is Copyright (c) 2018 - 2021 by MaxMind, Inc.

This is free software, licensed under the [Apache License, Version
2.0](LICENSE-APACHE) or the [MIT License](LICENSE-MIT), at your option.
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="description" content="">
<meta name="author" content="MaxMind, Inc.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="//mm-staticassets.storage.googleapis.com/gh-pages-theme/maxmind.css" rel="stylesheet">
<link href="https://static-gh.maxmind.com/maxmind.css" rel="stylesheet">
<link href="//dev.maxmind.com/css/dev.maxmind.com.css" rel="stylesheet">
<link href="//dev.maxmind.com/css/highlight-github.css" rel="stylesheet" >
<link rel="shortcut icon" href="//dev.maxmind.com/static/favicon.ico">
Expand Down
16 changes: 10 additions & 6 deletions doc/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Image information

The image is available on [Docker Hub](https://hub.docker.com/r/maxmindinc/geoipupdate).
The image is available on [Docker Hub](https://hub.docker.com/r/maxmindinc/geoipupdate).
The source code is available on [GitHub](https://github.com/maxmind/geoipupdate).

## Configuring
Expand Down Expand Up @@ -33,6 +33,10 @@ The following are optional:
default is `0`.
* `GEOIPUPDATE_VERBOSE` - Enable verbose mode. Prints out the steps that
`geoipupdate` takes. Set to **anything** (e.g., `1`) to enable.
* `GEOIPUPDATE_CONF_FILE` - The path where the configuration file will be
written. The default is `/etc/GeoIP.conf`.
* `GEOIPUPDATE_DB_DIR` - The directory where geoipupdate will download the
databases. The default is `/usr/share/GeoIP`.

The environment variables can be placed in a file with one per line and
passed in with the `--env-file` flag. Alternatively, you may pass them in
Expand All @@ -44,7 +48,7 @@ individually with the `-e` flag.

Run the latest image with:

```
```sh
docker run --env-file <file> -v <database directory>:/usr/share/GeoIP maxmindinc/geoipupdate
```

Expand All @@ -56,7 +60,7 @@ the databases to.

Run the latest image with:

```
```yaml
version: '3'
services:
geoipupdate:
Expand All @@ -82,8 +86,8 @@ volumes:
```
Note - When using docker-compose, you need to either:
- set `GEOIPUPDATE_FREQUENCY` equal to something greater than 0
or
- set `restart: on-failure`
* set `GEOIPUPDATE_FREQUENCY` equal to something greater than 0 or
* set `restart: on-failure`

If you don't, the container will continuously restart.
2 changes: 1 addition & 1 deletion doc/geoipupdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Report bugs to [support@maxmind.com](mailto:support@maxmind.com).

Written by William Storey.

This software is Copyright (c) 2018-2020 by MaxMind, Inc.
This software is Copyright (c) 2018-2021 by MaxMind, Inc.

This is free software, licensed under the Apache License, Version 2.0 or
the MIT License, at your option.
Expand Down
9 changes: 9 additions & 0 deletions docker/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ conf_file=/etc/GeoIP.conf
database_dir=/usr/share/GeoIP
flags=
frequency=$((GEOIPUPDATE_FREQUENCY * 60 * 60))

if ! [ -z "$GEOIPUPDATE_CONF_FILE" ]; then
conf_file=$GEOIPUPDATE_CONF_FILE
fi

if ! [ -z "$GEOIPUPDATE_DB_DIR" ]; then
database_dir=$GEOIPUPDATE_DB_DIR
fi

if [ -z "$GEOIPUPDATE_ACCOUNT_ID" ] || [ -z "$GEOIPUPDATE_LICENSE_KEY" ] || [ -z "$GEOIPUPDATE_EDITION_IDS" ]; then
echo "ERROR: You must set the environment variables GEOIPUPDATE_ACCOUNT_ID, GEOIPUPDATE_LICENSE_KEY, and GEOIPUPDATE_EDITION_IDS!"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.13

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gofrs/flock v0.8.0
github.com/gofrs/flock v0.8.1
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand Down

0 comments on commit 7ddfff7

Please sign in to comment.