From e4505c36badc73850a50bcb233e90ade6d3359a9 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Sat, 4 Oct 2025 12:21:36 +0700 Subject: [PATCH] fix: geoip standalone script should check on CONTAINER_ENGINE variable first Closes https://github.com/getsentry/self-hosted/issues/3953 --- install/geoip.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install/geoip.sh b/install/geoip.sh index 0d1b2efc0aa..a1e4400d9e8 100644 --- a/install/geoip.sh +++ b/install/geoip.sh @@ -1,3 +1,15 @@ +# If `$CONTAINER_ENGINE` is not set, we assume that we are running this script independently +# to update the geoip database as written on the documentation. +# Therefore we need to `source _detect-container-engine.sh` to detect the container engine. +if [[ -z "$CONTAINER_ENGINE" ]]; then + if [[ -f "install/_detect-container-engine.sh" ]]; then + source install/_detect-container-engine.sh + else + echo "Error: Cannot find install/_detect-container-engine.sh. Defaulting to docker." + export CONTAINER_ENGINE="docker" + fi +fi + echo "${_group}Setting up GeoIP integration ..." install_geoip() {