diff --git a/Dockerfile b/Dockerfile index 994eb68..adf904a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ ARG IMAGE_REPO="casjaysdev/alpine" ARG IMAGE_VERSION="latest" ARG CONTAINER_VERSION="${IMAGE_VERSION}" -ARG SERVICE_PORT="8080" -ARG EXPOSE_PORTS="8080" +ARG SERVICE_PORT="80" +ARG EXPOSE_PORTS="80" ARG PHP_VERSION="php81" ARG USER="root" diff --git a/rootfs/opt/echoip/geoip/GeoLite2-ASN.mmdb b/rootfs/opt/echoip/geoip/GeoLite2-ASN.mmdb old mode 100755 new mode 100644 index 847e45c..c3d432b Binary files a/rootfs/opt/echoip/geoip/GeoLite2-ASN.mmdb and b/rootfs/opt/echoip/geoip/GeoLite2-ASN.mmdb differ diff --git a/rootfs/opt/echoip/geoip/GeoLite2-City.mmdb b/rootfs/opt/echoip/geoip/GeoLite2-City.mmdb old mode 100755 new mode 100644 index a9c60fb..98ab843 Binary files a/rootfs/opt/echoip/geoip/GeoLite2-City.mmdb and b/rootfs/opt/echoip/geoip/GeoLite2-City.mmdb differ diff --git a/rootfs/opt/echoip/geoip/GeoLite2-Country.mmdb b/rootfs/opt/echoip/geoip/GeoLite2-Country.mmdb old mode 100755 new mode 100644 index 4b8fd2c..242e54a Binary files a/rootfs/opt/echoip/geoip/GeoLite2-Country.mmdb and b/rootfs/opt/echoip/geoip/GeoLite2-Country.mmdb differ diff --git a/rootfs/tmp/update-geoip-db.sh b/rootfs/tmp/update-geoip-db.sh index b1b38af..2064958 100755 --- a/rootfs/tmp/update-geoip-db.sh +++ b/rootfs/tmp/update-geoip-db.sh @@ -34,12 +34,16 @@ SRC_DIR="${BASH_SOURCE%/*}" # Set bash options set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +GEOIP_DATA_DIR="${1:-/opt/echoip/geoip}" +GEOIP_DOWNLOAD_URL="https://github.com/P3TERX/GeoLite.mmdb/raw/download" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for f in GeoLite2-ASN GeoLite2-City GeoLite2-Country; do - if curl -q -LSsf "https://github.com/P3TERX/GeoLite.mmdb/raw/download/$f.mmdb" -o "/opt/echoip/geoip/$f.tmp"; then - mv -f "/opt/echoip/geoip/$f.tmp" "/opt/echoip/geoip/$f.mmdb" - [ -f "/opt/echoip/geoip/$f.mmdb" ] && echo "Installed $f.mmdb to /opt/echoip/geoip" + printf '%s : ' "Attempting to download from $GEOIP_DOWNLOAD_URL/$f.mmdb" + if curl -q -LSsf "$GEOIP_DOWNLOAD_URL/$f.mmdb" -o "$GEOIP_DATA_DIR/$f.tmp"; then + mv -f "$GEOIP_DATA_DIR/$f.tmp" "$GEOIP_DATA_DIR/$f.mmdb" + [ -f "$GEOIP_DATA_DIR/$f.mmdb" ] && echo "Installed to $GEOIP_DATA_DIR/$f.mmdb" else - echo "Failed to update GeoIP $f" + echo "Failed to update $GEOIP_DATA_DIR/$f.mmdb" exit 10 fi done diff --git a/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh b/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh index f51261b..9d4dae5 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh @@ -105,7 +105,7 @@ user_name="${IFCONFIG_USER_NAME:-}" # normal user name user_pass="${IFCONFIG_USER_PASS_WORD:-}" # normal user password # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # port which service is listening on -SERVICE_PORT="8080" +SERVICE_PORT="80" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # User to use to launch service - IE: postgres RUNAS_USER="root" # normally root @@ -125,7 +125,7 @@ EXEC_CMD_ARGS+='-t /opt/echoip/html ' # co EXEC_CMD_ARGS+='-a /opt/echoip/geoip/GeoLite2-ASN.mmdb ' # command arguments EXEC_CMD_ARGS+='-c /opt/echoip/geoip/GeoLite2-City.mmdb ' # command arguments EXEC_CMD_ARGS+='-f /opt/echoip/geoip/GeoLite2-Country.mmdb ' # command arguments -EXEC_PRE_SCRIPT='' # execute script before +EXEC_PRE_SCRIPT='sleep 60' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Is this service a web server IS_WEB_SERVER="no"