Skip to content

Commit 0615e6e

Browse files
committed
Added support to automatically update the geoip database.
1 parent 91bc79b commit 0615e6e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ RUN \
146146
make install && \
147147
find /var/lib/nginx/ -type f -name '*.so*' -exec strip {} ';' && \
148148
strip /usr/sbin/nginx && \
149+
ln -s /config/geoip2 /var/lib/GeoIP2 && \
149150
cd .. && \
150151
# Cleanup.
151152
del-pkg build-dependencies && \
@@ -187,6 +188,8 @@ RUN \
187188
bash \
188189
# For openresty
189190
pcre \
191+
# For GeoIP2 database update
192+
curl \
190193
&& \
191194
# Adjust the logrotate config file.
192195
sed-patch 's|^/var/log/messages|#/var/log/messages|' /etc/logrotate.conf
@@ -355,7 +358,9 @@ COPY rootfs/ /
355358
# Set environment variables.
356359
ENV APP_NAME="Nginx Proxy Manager" \
357360
KEEP_APP_RUNNING=1 \
358-
DISABLE_IPV6=0
361+
DISABLE_IPV6=0 \
362+
MAXMINDDB_EDITION=GeoLite2-Country \
363+
MAXMINDDB_LICENSE_KEY=
359364

360365
# Define mountable directories.
361366
VOLUME ["/config"]

rootfs/etc/cont-init.d/nginx-proxy-manager.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ mkdir -p \
2424
/config/nginx/temp \
2525
/config/log/letsencrypt \
2626
/config/letsencrypt-workdir \
27+
/config/geoip2 \
2728

2829
# Make sure to remove old logs directory symlink.
2930
[ ! -L /config/logs ] || rm /config/logs

0 commit comments

Comments
 (0)