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

Commit ce6482d

Browse files
committed
create GeoIP2 db during container start
1 parent 88af129 commit ce6482d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
257257

258258
## Versions
259259

260+
* **31.07.19:** - Create GeoIP2 databse (libmaxminddb) during container start if it doesn't exist.
260261
* **30.07.19:** - Support main domain via duckdns validation.
261262
* **29.07.19:** - Enable http to https redirect by default (effective only for new installs).
262263
* **01.07.19:** - Patch geoip2 module until upstream is fixed.

readme-vars.yml

+1
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: "31.07.19:", desc: "Create GeoIP2 databse (libmaxminddb) during container start if it doesn't exist." }
129130
- { date: "30.07.19:", desc: "Support main domain via duckdns validation." }
130131
- { date: "29.07.19:", desc: "Enable http to https redirect by default (effective only for new installs)." }
131132
- { date: "01.07.19:", desc: "Patch geoip2 module until upstream is fixed." }

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

+5
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ else
247247
echo "Certificate exists; parameters unchanged; starting nginx"
248248
fi
249249

250+
# check GeoIP2 database
251+
[[ ! -f /var/lib/libmaxminddb/GeoLite2-City.mmdb ]] && \
252+
echo "creating GeoIP2 database" && \
253+
/etc/periodic/weekly/libmaxminddb
254+
250255
# logfiles needed by fail2ban
251256
[[ ! -f /config/log/nginx/error.log ]] && \
252257
touch /config/log/nginx/error.log

0 commit comments

Comments
 (0)