diff --git a/backend/importer.Dockerfile b/backend/importer.Dockerfile index 4411544..c652759 100644 --- a/backend/importer.Dockerfile +++ b/backend/importer.Dockerfile @@ -9,6 +9,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ ca-certificates \ redis-tools \ + bzip2 \ + pbzip2 \ && rm -rf /var/lib/apt/lists/* RUN git clone --depth=1 https://github.com/openmaptiles/openmaptiles.git /opt/openmaptiles diff --git a/backend/scripts/04_import_geocoding.sh b/backend/scripts/04_import_geocoding.sh index bdd3393..950f13b 100755 --- a/backend/scripts/04_import_geocoding.sh +++ b/backend/scripts/04_import_geocoding.sh @@ -16,7 +16,11 @@ PHOTON_URL="https://download1.graphhopper.com/public/europe/${COUNTRY}/photon-db echo "=== Downloading Photon index: $PHOTON_URL ===" -wget -O - "$PHOTON_URL" | bzip2 -cd | tar x -C "$PHOTON_DATA" +wget -O "${PHOTON_DATA}/photon-db.tar.bz2" "$PHOTON_URL" + +echo "=== Extracting Photon index ===" +pbzip2 -cd "${PHOTON_DATA}/photon-db.tar.bz2" | tar x -C "$PHOTON_DATA" +rm "${PHOTON_DATA}/photon-db.tar.bz2" echo "Photon index extracted to $PHOTON_DATA" echo "Add a volume mount to the photon service: ../data/photon:/photon/photon_data"