mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-29 03:33:19 -04:00
Add new geoip2influx files from upstream (#955)
* Add new geoip2influx files from upstream
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo -e "[init-geoip2influx-setup] Starting"
|
||||
|
||||
|
||||
if ! pip list 2>&1 | grep -q "influxdb"; then
|
||||
echo '-------------------------------------------------------------'
|
||||
echo '| Mod by Gilbn |'
|
||||
echo '| Adding required modules for Geoip2Influx to install list |'
|
||||
echo '-------------------------------------------------------------'
|
||||
echo "\
|
||||
geoip2==3.0.0 \
|
||||
geoip2==4.8.0 \
|
||||
geohash2==1.1 \
|
||||
influxdb==5.3.0 \
|
||||
influxdb==5.3.2 \
|
||||
python-dotenv \
|
||||
influxdb-client==1.44.0 \
|
||||
IPy==1.01" >> /mod-pip-packages-to-install.list
|
||||
fi
|
||||
|
||||
@@ -25,19 +30,35 @@ lsiown -R abc:abc \
|
||||
/geoip2influx \
|
||||
/config/log/geoip2influx
|
||||
|
||||
chmod +x /geoip2influx/geoip2influx.py
|
||||
chmod +x /geoip2influx/run.py
|
||||
|
||||
# Display variables for troubleshooting
|
||||
echo -e "Variables set:\\n\
|
||||
NGINX_LOG_PATH=${NGINX_LOG_PATH}\\n\
|
||||
echo -e "[init-geoip2influx-setup] Variables set:\\n\\n
|
||||
INFLUX_HOST=${INFLUX_HOST}\\n\
|
||||
INFLUX_HOST_PORT=${INFLUX_HOST_PORT}\\n\
|
||||
INFLUX_DATABASE=${INFLUX_DATABASE}\\n\
|
||||
INFLUX_USER=${INFLUX_USER}\\n\
|
||||
INFLUX_PASS=${INFLUX_PASS}\\n\
|
||||
INFLUX_RETENTION=${INFLUX_RETENTION}\\n\
|
||||
INFLUX_SHARD=${INFLUX_SHARD}\\n\
|
||||
INFLUX_SHARD=${INFLUX_SHARD}\\n\\n
|
||||
INFLUXDB_V2_TOKEN=${INFLUXDB_V2_TOKEN}\\n\
|
||||
INFLUXDB_V2_URL=${INFLUXDB_V2_URL}\\n\
|
||||
INFLUXDB_V2_ORG=${INFLUXDB_V2_ORG}\\n\
|
||||
INFLUXDB_V2_BUCKET=${INFLUXDB_V2_BUCKET}\\n\
|
||||
INFLUXDB_V2_RETENTION=${INFLUXDB_V2_RETENTION}\\n\
|
||||
INFLUXDB_V2_DEBUG=${INFLUXDB_V2_DEBUG}\\n\
|
||||
INFLUXDB_V2_BATCHING=${INFLUXDB_V2_BATCHING}\\n\
|
||||
INFLUXDB_V2_BATCH_SIZE=${INFLUXDB_V2_BATCH_SIZE}\\n\
|
||||
INFLUXDB_V2_FLUSH_INTERVAL=${INFLUXDB_V2_FLUSH_INTERVAL}\\n\\n
|
||||
GEO_MEASUREMENT=${GEO_MEASUREMENT}\\n\
|
||||
LOG_MEASUREMENT=${LOG_MEASUREMENT}\\n\
|
||||
NGINX_LOG_PATH=${NGINX_LOG_PATH}\\n\
|
||||
SEND_NGINX_LOGS=${SEND_NGINX_LOGS}\\n\
|
||||
GEOIP2INFLUX_LOG_LEVEL=${GEOIP2INFLUX_LOG_LEVEL}\\n"
|
||||
GEOIP2INFLUX_LOG_LEVEL=${GEOIP2INFLUX_LOG_LEVEL}\\n\
|
||||
GEOIP2INFLUX_LOG_PATH=${GEOIP2INFLUX_LOG_PATH}\\n\
|
||||
GEOIP_DB_PATH=${GEOIP_DB_PATH}\\n\
|
||||
USE_INFLUXDB_V2=${USE_INFLUXDB_V2}\\n\
|
||||
MAXMINDDB_USER_ID=${MAXMINDDB_USER_ID}\\n\
|
||||
MAXMINDDB_LICENSE_KEY=${MAXMINDDB_LICENSE_KEY}\\n"
|
||||
|
||||
echo -e "[init-geoip2influx-setup] Finished"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
exec \
|
||||
python3 /geoip2influx/geoip2influx.py
|
||||
python3 /geoip2influx/run.py
|
||||
Reference in New Issue
Block a user