Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

Commit 7705506

Browse files
authored
Merge pull request #456 from linuxserver/geoip2
remove imagick, add geoip2 db update
2 parents 30694b7 + 75b9685 commit 7705506

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ RUN \
6767
php7-pdo_sqlite \
6868
php7-pear \
6969
php7-pecl-apcu \
70-
php7-pecl-imagick \
7170
php7-pecl-redis \
7271
php7-pgsql \
7372
php7-phar \

Dockerfile.aarch64

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ RUN \
6767
php7-pdo_sqlite \
6868
php7-pear \
6969
php7-pecl-apcu \
70-
php7-pecl-imagick \
7170
php7-pecl-redis \
7271
php7-pgsql \
7372
php7-phar \

Dockerfile.armhf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ RUN \
6767
php7-pdo_sqlite \
6868
php7-pear \
6969
php7-pecl-apcu \
70-
php7-pecl-imagick \
7170
php7-pecl-redis \
7271
php7-pgsql \
7372
php7-phar \

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
290290

291291
## Versions
292292

293+
* **15.05.20:** - Remove `php7-pecl-imagick` due to upstream issues. Add support for `Geoip2` auto db retrieval.
293294
* **10.05.20:** - Added support for fail2ban deny statements.
294295
* **04.05.20:** - Allow for optionally setting propagation time for dns plugins. Add repo version of `whois` to replace the built-in busybox version. Update `jail.local` to change default fail2ban ban action to more widely supported `iptables-allports`.
295296
* **13.04.20:** - Update cloudflare.ini with token info.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ app_setup_nginx_reverse_proxy_block: ""
126126

127127
# changelog
128128
changelogs:
129+
- { date: "15.05.20:", desc: "Remove `php7-pecl-imagick` due to upstream issues. Add support for `Geoip2` auto db retrieval." }
129130
- { date: "10.05.20:", desc: "Added support for fail2ban deny statements." }
130131
- { date: "04.05.20:", desc: "Allow for optionally setting propagation time for dns plugins. Add repo version of `whois` to replace the built-in busybox version. Update `jail.local` to change default fail2ban ban action to more widely supported `iptables-allports`." }
131132
- { date: "13.04.20:", desc: "Update cloudflare.ini with token info." }

root/etc/cont-init.d/50-config

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,17 @@ fi
274274
[[ ! -d /var/lib/libmaxminddb ]] && \
275275
ln -s /config/geoip2db /var/lib/libmaxminddb
276276
# check GeoIP2 database
277-
[[ ! -f /var/lib/libmaxminddb/GeoLite2-City.mmdb ]] && \
278-
echo "Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please manually download/update the GeoIP2 db and save as /config/geoip2db/GeoLite2-City.mmdb"
277+
if [ -n "$MAXMINDDB_LICENSE_KEY" ]; then
278+
sed -i "s|.*MAXMINDDB_LICENSE_KEY.*|MAXMINDDB_LICENSE_KEY=\"${MAXMINDDB_LICENSE_KEY}\"|g" /etc/conf.d/libmaxminddb
279+
if [ ! -f /var/lib/libmaxminddb/GeoLite2-City.mmdb ]; then
280+
echo "Downloading GeoIP2 City database."
281+
/etc/periodic/weekly/libmaxminddb
282+
fi
283+
elif [ -f /var/lib/libmaxminddb/GeoLite2-City.mmdb ]; then
284+
echo -e "Currently using the user provided GeoLite2-City.mmdb.\nIf you want to enable weekly auto-updates of the database, retrieve a free license key from MaxMind,\nand add a new env variable \"MAXMINDDB_LICENSE_KEY\", set to your license key."
285+
else
286+
echo -e "Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please retrieve a free license key from MaxMind,\nand add a new env variable \"MAXMINDDB_LICENSE_KEY\", set to your license key."
287+
fi
279288

280289
# logfiles needed by fail2ban
281290
[[ ! -f /config/log/nginx/error.log ]] && \

0 commit comments

Comments
 (0)